Joke Collection Website - Public benefit messages - How to display a 3-minute countdown using js and output the specified number
How to display a 3-minute countdown using js and output the specified number
function?timeshow(){
var?time?=?3;//s
var?start?=?window.setInterval(function( ){
time?=?time?-?1;
console.log(time);
document.getElementById('show').innerHTML ='Timer starts, '+time+'jump after seconds!';
if(time?==?0){
window.clearInterval(start);
document.getElementById('show').innerHTML='Timeout';
}
},1000);
} p>
- Related articles
- Can the movie tickets bought by Cat's Eye be fake? What does it mean that the ticket pick-up code will not be sent by SMS?
- How to set a custom shortcut message in the glory of the king?
- What basic arrangements and precautions are needed for marriage?
- How to send messages anonymously?
- What should I do if I send a message to the rice cooker by courier?
- Why can't I get a short message from China Bank?
- Can Apple's icloud back up short messages?
- What does the white number of WeChat mean?
- How to send a message to save my predecessor?
- Longxin Finance sends text messages.