addEventListener3 로또 번호 생성하기2 (Javascript) li{ margin: 10px; } 로또 번호 추출 const lotto = document.querySelector('.js-lotto') const btn = document.querySelector('button') const lotto_number = [] function handleLotto(){ let arr = []; for(let i = 0; i 2020. 8. 10. addEventListener, Window.innerWidth 활용(JavaScript) DOCTYPE html> Document Hello JavaScript!! const title = document.querySelector("body");const colors = ["#1abc9c", "#3498db", "#9b59b6", "#f39c12", "#e74c3c", "#C18282", "#FF50CF","#0A9696"];const RESIZE_CLASS = title.style.backgroundColor = colors[0]; function handleResize() { var wframe = window.innerWidth console.log(wframe); if(wframe200 &&wframe 400 &&wframe 600 &&wframe 800 &&wframe 1000 &&.. 2020. 8. 6. addEventListener 간단한 예제(JavaScript) https://developer.mozilla.org/ko/docs/Web/API/EventTarget/addEventListener #container{ margin: 30px auto; text-align: center; width: 300px; height: 300px; border: 2px solid black; color: white; } Hello const divTag = document.getElementById("container"); function handleMouseOver() { divTag.style.backgroundColor ="red"; divTag.innerHTML = "mouseover"; } function handleLeave() { divTag.style.backg.. 2020. 8. 5. 이전 1 다음