<! DOCTYPE html>
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 ">
<meta name= "Apple-mobile-web-app-title" content= "" >
<meta http-equiv= "Cache-control" content= "No-cache" >
<meta name= "format-detection" content= "Telephone=no" >
<meta name= "viewport" content= "Width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=yes, Minimal-ui ">
<title>test</title>
<script src= "Js/jquery-2.0.0.min.js" type= "Text/javascript" charset= "Utf-8" ></script>
<script type= "Text/javascript" >
var status = 1;
</script>
<body>
<p id= "countmsg" > Distance:
<b id= "T_d" >00 Day </b>
<b id= "T_h" >00 </b>
<b id= "T_m" >00 points </b>
<b id= "t_s" >00 sec </b>
</p>
<script type= "Text/javascript" >
function Getrtime () {
var endtime= new Date (' 2016/1/15 13:47:19 '); Cut-off time
var nowtime = new Date ();
var t =endtime.gettime ()-nowtime.gettime ();
var d=-(Math.floor (T/1000/60/60/24));
var h=-(Math.floor (t/1000/60/60%24));
var m=-(Math.floor (t/1000/60%60));
var s=-(Math.floor (t/1000%60));
Console.log ("d=" + (-D) + "h=" + (-H) + "m=" + (-m) + "s=" + (-s));
document.getElementById ("T_d"). InnerHTML = d + "Day";
document.getElementById ("T_h"). InnerHTML = h + "when";
document.getElementById ("T_m"). InnerHTML = m + "min";
document.getElementById ("t_s"). InnerHTML = s + "s";
if (d = = 0 && h ==0 && m ==0 && s = = 0) {
document.getElementById ("T_d"). InnerHTML = 0;
document.getElementById ("T_h"). InnerHTML = 0;
document.getElementById ("T_m"). InnerHTML = 0;
document.getElementById ("t_s"). InnerHTML = 0;
Alert ("Skip Live Room")
}
}
SetInterval (getrtime,1000);
</script>
</body>
Similar e-commerce countdown code