728x90 반응형 DOM2 DOM DOCTYPE html>html lang="en">head> meta charset="UTF-8"> meta name="viewport" content="width=device-width, initial-scale=1.0"> title>DOMtitle> style> .area{ width:400px; height: 400px; border: 1px solid black; } .area >div{ width:100%; height:10%; box-sizing:border-box; border:2px.. 2024. 6. 20. window 내장객체 // window.setTimeout(함수,지연시간(ms))document.getElementById("btn1").addEventListener("click", function(){ setTimeout(function(){ alert("3초후 출력 확인!") }, 3000)})let interval; //setInterval을 저장하기 위한 전역 변수//window.setInterval(함수,지연시간(ms))function clockFn(){ const clock = document.getElementById("clock"); clock.innerHTML = currentTime(); // 현재 시간 화면에 출력 // 지연 시간 마다 반복(첫 반복도 지연시간 후에.. 2024. 6. 19. 이전 1 다음 728x90 반응형