๋ฐ์ํ ๋ฐ๋๋ผjs40 [๋ฐ๋๋ผJS๋ก ํฌ๋กฌ ์ฑ ๋ง๋ค๊ธฐ] Saving the User Name part Two [์ถ์ฒ-์ ํ๋ธ ๋ ธ๋ง๋ ์ฝ๋ Nomad Coders] https://youtu.be/7gYwj8vh_OQ greeting.js const form = document.querySelector(".js-form"), input = form.querySelector("input"), greeting = document.querySelector(".js-greetings"); const USER_LS = "currentUser", SHOWING_CN = "showing"; function handleSubmit(event){ event.preventDefault(); const currentValue = input.value; paintGreeting(currentValue); } function askForN.. 2021. 2. 26. [๋ฐ๋๋ผJS๋ก ํฌ๋กฌ ์ฑ ๋ง๋ค๊ธฐ] Saving the User Name part One [์ถ์ฒ-์ ํ๋ธ ๋ ธ๋ง๋ ์ฝ๋ Nomad Coders] https://youtu.be/lXxlGCRBOQU index.html 00:00 index.html 00:00 index.css body { background-color: #ecf0f1; } .btn { cursor: pointer; } h1 { color: #34495e; transition: color 0.5s ease-in-out; } .clicked { color: #7f8c8d; } .form, .greetings { display: none; } .showing { display: block; } greeting.js const form = document.querySelector(".js-form"), input = form.queryS.. 2021. 2. 26. [๋ฐ๋๋ผJS๋ก ํฌ๋กฌ ์ฑ ๋ง๋ค๊ธฐ] Making a JS Clock part Two [์ถ์ฒ-์ ํ๋ธ ๋ ธ๋ง๋ ์ฝ๋ Nomad Coders] https://youtu.be/jstjlCZa7nA setInterval(fn, 1000) ์ฒซ ๋ฒ์งธ ์ธ์๋ ํจ์, ๋ ๋ฒ์งธ ์ธ์๋ ์คํํ ์๊ฐ ๊ฐ๊ฒฉ(millisecond)์ด๋ค const clockContainer = document.querySelector(".js-clock"), clockTitle = clockContainer.querySelector("h1"); function getTime(){ const date = new Date(); const minutes = date.getMinutes(); const hours = date.getHours(); const seconds = date.getSeconds(); clockTitle.inner.. 2021. 2. 26. [๋ฐ๋๋ผJS๋ก ํฌ๋กฌ ์ฑ ๋ง๋ค๊ธฐ] Making a JS Clock part One [์ถ์ฒ-์ ํ๋ธ ๋ ธ๋ง๋ ์ฝ๋ Nomad Coders] https://youtu.be/f0nBj0YMBUI -์ด๋ก ๋. ์ด์ momentum์ ๋ง๋ค์ index.html 00:00 clock.js const clockContainer = document.querySelector(".js-clock"), clockTitle = clockContainer.querySelector("h1"); function getTime(){ const date = new Date(); const minute = date.getMinutes(); const hours = date.getHours(); const seconds = date.getSeconds(); clockTitle.innerText = `${hours}:${m.. 2021. 2. 26. [๋ฐ๋๋ผJS๋ก ํฌ๋กฌ ์ฑ ๋ง๋ค๊ธฐ] DOM - If else - Function practice Two [์ถ์ฒ-์ ํ๋ธ ๋ ธ๋ง๋ ์ฝ๋ Nomad Coders] https://youtu.be/S4BN1tZmmWw index.js const title = document.querySelector("#title"); const CLICKED_CLASS = "clicked"; function handleClick(){ const currentClass = title.className; if(currentClass !== CLICKED_CLASS){ title.className = CLICKED_CLASS; } else { title.className = ""; } } function init(){ title.addEventListener("click", handleClick); } init(); index.css (.. 2021. 2. 26. [๋ฐ๋๋ผJS๋ก ํฌ๋กฌ ์ฑ ๋ง๋ค๊ธฐ] DOM - If else - Function practice [์ถ์ฒ-์ ํ๋ธ ๋ ธ๋ง๋ ์ฝ๋ Nomad Coders] https://youtu.be/UwnBvuFyiBU -์ด๋ฒคํธ์ ๊ทผ์์ ์๊ณ ์ถ์ผ๋ฉด ํญ์ MDN์ ์ฐพ์๋ณด๋ผ const title = document.querySelector("#title"); const BASE_COLOR = "rgb(52, 73, 94)"; const OTHER_COLOR = "#7f8c8d"; function handleClick(){ const currentColor = title.style.color; console.log(currentColor); } function init(){ title.style.color = BASE_COLOR; title.addEventListener("click", handleClick); } ini.. 2021. 2. 26. ์ด์ 1 2 3 4 5 6 7 ๋ค์ ๋ฐ์ํ