HEX1 hex color가 왜 안먹히는 지 모르겠음. const title = document.querySelector("#title"); const BASE_COLOR = "rgb(26, 188, 156)"; const OTHER_COLOR = "rgb(192, 57, 43)"; function handleClick(){ const currentColor = title.style.color; console.log(currentColor); if (currentColor === BASE_COLOR){ title.style.color = OTHER_COLOR; } else { title.style.color = BASE_COLOR; } } function init(){ title.style.color = BASE_COLOR; title.addEventList.. 2020. 3. 16. 이전 1 다음