以下js代码加到你需要的地方即可

<SCRIPT language=javascript>
<!--
BirthDay1=new Date("11/26/2007 02:40:00");//改成你的计时日期
today1=new Date();
function THINPIGServerTime1(){
today1.setTime(today1.getTime()+250);
timeold1=(today1.getTime()-BirthDay1.getTime());
sectimeold1=timeold1/1000
secondsold1=Math.floor(sectimeold1);
msPerDay1=24*60*60*1000
e_daysold1=timeold1/msPerDay1
daysold1=Math.floor(e_daysold1);
e_hrsold1=(e_daysold1-daysold1)*24;
hrsold1=Math.floor(e_hrsold1);
e_minsold1=(e_hrsold1-hrsold1)*60;
minsold1=Math.floor((e_hrsold1-hrsold1)*60);
seconds1=Math.floor((e_minsold1-minsold1)*60);
document.getElementById("djclock").innerHTML ='<span style="color:#ff5400">'+daysold1+"</span>天<span style="color:#ff5400">"+hrsold1+"</span>小时<span style="color:#ff5400">"+minsold1+"</span>分<span style="color:#ff5400">"+seconds1+"</span>秒";
}
setInterval("THINPIGServerTime1()",250);
//-->
</SCRIPT>
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。