This doomsday countdown source code has a JS controller on the program. It is a countdown timer used for display on web pages. You can set the start time of the end of the world. You can directly copy the doomsday countdown source code on the web page and use it without downloading. , you can use it directly
There is also
<script> <br>function downTime(){ <br>var timeout = window.setTimeout(downTime, 100); <br>var endTime=new Date("12-21-2012 0:0:0");//Change to your timing date<br>var today=new Date(); <br>var timeold =(endTime.getTime()-today.getTime()); <br>if(timeold <= 100){ <BR>window.clearTimeout(timeout); <BR>document.getElementByIdx_x("container").innerHTML = "It turns out it's okay, it was a false alarm!"; <BR>return; <BR>} <BR>var sectimeold=timeold/1000; <BR>var secondsold=Math.floor(sectimeold); <BR>var msPerDay= 24*60*60*1000; <BR>var e_daysold=timeold/msPerDay; <BR>var daysold=Math.floor(e_daysold); <BR>var e_hrsold=(e_daysold-daysold)*24; <BR>var hrsold =Math.floor(e_hrsold); <BR>var e_minsold=(e_hrsold-hrsold)*60; <BR>var minsold=Math.floor((e_hrsold-hrsold)*60); <BR>var e_seconds=(e_minsold- minsold)*60; <BR>var seconds=Math.floor((e_minsold-minsold)*60); <BR>var decimals = Math.floor((e_seconds-seconds)*10); <BR>document.getElementByIdx_x( "downtime").innerHTML=daysold "days" hrsold "hours" minsold "minutes" seconds "." decimals "seconds" ; <BR>} <BR>downTime(); <BR></script>