diff --git a/yoojin/html/colors.js b/yoojin/html/colors.js index 2966981..1013ec4 100644 --- a/yoojin/html/colors.js +++ b/yoojin/html/colors.js @@ -25,14 +25,14 @@ var Body = { function nightDayHandler(self) { var target = document.querySelector("body"); if (self.value === "night") { - Body.SetBackgroundColor = "black"; - Body.SetColor = "white"; + Body.SetBackgroundColor("black"); + Body.SetColor("white"); self.value = "day"; Links.SetColor("powderblue"); } else { - Body.SetBackgroundColor = "white"; - Body.SetColor = "black"; + Body.SetBackgroundColor("white"); + Body.SetColor("black"); self.value = "night"; Links.SetColor("blue"); diff --git "a/yoojin/\353\205\270\353\247\210\353\223\234/app.js" "b/yoojin/\353\205\270\353\247\210\353\223\234/app.js" new file mode 100644 index 0000000..0d1121a --- /dev/null +++ "b/yoojin/\353\205\270\353\247\210\353\223\234/app.js" @@ -0,0 +1,16 @@ +const title = document.querySelector("div.hello:first-child h1"); + +function handleTitleClick() { + title.style.color = "blue"; +} + +function handleMouseEnter() { + title.innerText = "Mouse is here!"; +} + +function handleMouseLeave() { + title.innerText = "Mouse is gone!"; +} +title.addEventListener("click", handleTitleClick); +title.addEventListener("mouseenter", handleMouseEnter); +title.addEventListener("mouseleave", handleMouseLeave); diff --git "a/yoojin/\353\205\270\353\247\210\353\223\234/index.html" "b/yoojin/\353\205\270\353\247\210\353\223\234/index.html" new file mode 100644 index 0000000..876dc25 --- /dev/null +++ "b/yoojin/\353\205\270\353\247\210\353\223\234/index.html" @@ -0,0 +1,15 @@ + + +
+ + + +