๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๋ฐ˜์‘ํ˜•

๋ฐ”๋‹๋ผ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.
๋ฐ˜์‘ํ˜•