</pre><pre name="code" class="html"><body>
<DIV id="CountMsg" class="HotDate">
</DIV>
</body>
<script>
var timebox=document.getElementById("CountMsg");
var datetime='20161012221935';
var yyy=datetime.substr(0,4);
var EndTime= new Date(yyy,10,12,22,19,35);
function GetRTime(){
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);
if(d<=0&&h<=0&&m<=0&&s<=0){
timebox.innerHTML="over";
}else{
timebox.innerHTML=d + "天"+h+"shi"+m+"fen"+s+"miao";
}
}
setInterval(GetRTime,1000);
</script>
倒计时
最新推荐文章于 2024-06-12 14:02:38 发布