Hello 100A

  • 홈
  • 태그

Timer 1

javascript Timer 타이머 SetTimeout(), clearTimeout()

javascript로 짠 간단한 타이머 프로그램입니다. Timer Timer 시작 일시정지 let txtArea = document.querySelector('h2'); let startEl = document.querySelector('.startbtn'); let stopEl = document.querySelector('.stopbtn'); let state = false; let timer; let count=0; let timerId; timer = { run: function (){ clearTimeout(timerId); txtArea.textContent = count++; timerId = setTimeout(timer.run, 1000); }, stop: function(){ clear..

coding/web 2021.06.24
1
더보기
프로필사진

  • 분류 전체보기 (36)
    • coding (34)
      • web (24)
      • c# (2)
      • short code (8)
    • review (0)
    • diary (2)

Calendar

«   2026/02   »
일 월 화 수 목 금 토
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28

Copyright © Kakao Corp. All rights reserved.

티스토리툴바