您当前的位置:首页 > 帝国CMS教程

帝国仿站距离多少天js代码

来源:帝国CMS教程发布者:帝国CMS模板网时间:2010-11-05

<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>