일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 |
Tags
- 데이터베이스
- JS
- Atlassian
- ubuntu
- Windows
- PostgreSQL
- Linux
- DB
- java
- 3.0
- javascript
- DATABASE
- node
- script
- 리눅스
- 설치
- 자바
- 설정
- postgres
- 자바스크립트
- 우분투
- install
- 윈도우
- 노드
- hamonikr
- python
- 파이썬
- 스크립트
- 아틀라시안
- 하모니카
Archives
- Today
- Total
목록타이머 (1)
LukeHan 의 잡다한 기술 블로그
javascript 에서 timer 기능 사용하기
function startTimer(duration, display){ var timer = duration, seconds; var interval = setInterval(function(){ seconds = parseInt(timer % 60, 10); seconds = seconds < 10 ? "0" + seconds : seconds; display.textContent = seconds; if(timer === 0){ clearInterval(interval); } if(--timer < 0){ timer = duration; } }, 1000); } startTimer(60, document.querySelector('#timeCount'));
개발/javascript
2023. 5. 30. 20:00