& lthead & gt& ltmeta? charset=\"UTF-8 \" >& lt/head & gt;& ltbody & gt& lt input? Placeholder= \"Please" />

Joke Collection Website - Blessing messages - The countdown button with start and pause is realized with js complete code.

The countdown button with start and pause is realized with js complete code.

& lt! doctype? html & gt

& lthtml? lang="en " >

& lthead & gt

& ltmeta? charset="UTF-8 " >

< title & gt document

& lt/head & gt;

& ltbody & gt

& lt input? Placeholder= "Please enter the time"? id = " inp " & gt

& lt button? onclick = " go()" & gt; Start ; & lt button? onclick = " stop()" & gt; Stop ; & lt button? Id= "Xu Ji"? Onclick= "Xu Ji ()"? Style="display: none; "> continue & lt/button & gt;;

& ltdiv? id = " result " & gt& lt/div & gt;

& lt script & gt

var? Time,

div = document . getelementbyid(' result '),

Stop state? =? Fake;

Function? go(){

Time? =? document.getElementById('inp ')。 Value;

time out();

}

Function? Timeout () {

If (time? ==''){

Reminder ("Please enter time")

Return;

}

setTimeout(function(){

Time-;

div.innerText? =? Time;

If (time! ==0? & amp& amp? ! Stop state) {

time out();

}

}, 1000);

}

Function? Xu Ji () {

Time? =? number(document . getelementbyid(' result ')。 innerText);

Document.getElementById ('Xu Ji'). =? "none";

Stop state? = false;

time out();

}

Function? stop(){

Document.getElementById ('Xu Ji'). =? '';

Stop state? =? True;

}

& lt/script & gt;

& lt/body & gt;

& lt/html & gt;