From 4c4831dd37e7a2eab29592e37c7d30c655f6d4f9 Mon Sep 17 00:00:00 2001 From: yoojin <76746507+syj318@users.noreply.github.com> Date: Tue, 9 Jul 2024 20:35:51 +0900 Subject: [PATCH 1/2] =?UTF-8?q?24~26=20js=EA=B0=95=EC=9D=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit js 부분 수정 --- yoojin/html/colors.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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"); From 8606eaaf9b59f445af76bd316c9301eb38f24480 Mon Sep 17 00:00:00 2001 From: yoojin <76746507+syj318@users.noreply.github.com> Date: Mon, 29 Jul 2024 16:19:35 +0900 Subject: [PATCH 2/2] =?UTF-8?q?js=20=EB=85=B8=EB=A7=88=EB=93=9C=EA=B0=95?= =?UTF-8?q?=EC=9D=98(3.0~3.4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\353\205\270\353\247\210\353\223\234/app.js" | 16 ++++++++++++++++ .../index.html" | 15 +++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 "yoojin/\353\205\270\353\247\210\353\223\234/app.js" create mode 100644 "yoojin/\353\205\270\353\247\210\353\223\234/index.html" 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 @@ + + +
+ + + +