倒计时IE NaN小时NaN分NaN秒怎么解决
functionshow_student163_time(){window.setTimeout("show_student163_time()",1000);Birth...
function show_student163_time(){
window.setTimeout("show_student163_time()", 1000);
BirthDay=new Date("2014-12-24");
today=new Date();
timeold=(BirthDay.getTime()-today.getTime());
sectimeold=timeold/1000
secondsold=Math.floor(sectimeold);
msPerDay=24*60*60*1000
e_daysold=timeold/msPerDay
daysold=Math.floor(e_daysold);
e_hrsold=(e_daysold-daysold)*24;
hrsold=Math.floor(e_hrsold);
e_minsold=(e_hrsold-hrsold)*60;
minsold=Math.floor((e_hrsold-hrsold)*60);
seconds=Math.floor((e_minsold-minsold)*60);
span_dt_dt.innerHTML=hrsold+"<span>小时</span>"+minsold+"<span>分</span>"+seconds+"<span>秒</span>" ;
span_dt_dt2.innerHTML=daysold+"天";
}
show_student163_time(); 展开
window.setTimeout("show_student163_time()", 1000);
BirthDay=new Date("2014-12-24");
today=new Date();
timeold=(BirthDay.getTime()-today.getTime());
sectimeold=timeold/1000
secondsold=Math.floor(sectimeold);
msPerDay=24*60*60*1000
e_daysold=timeold/msPerDay
daysold=Math.floor(e_daysold);
e_hrsold=(e_daysold-daysold)*24;
hrsold=Math.floor(e_hrsold);
e_minsold=(e_hrsold-hrsold)*60;
minsold=Math.floor((e_hrsold-hrsold)*60);
seconds=Math.floor((e_minsold-minsold)*60);
span_dt_dt.innerHTML=hrsold+"<span>小时</span>"+minsold+"<span>分</span>"+seconds+"<span>秒</span>" ;
span_dt_dt2.innerHTML=daysold+"天";
}
show_student163_time(); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询