渡 //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
;
<头>
正计时 >
#thenceThen{font-size:2em;}
function thenceThen(){
var date1 = new Date(1381741113671);
var TotalSecs=(new Date()-date1)/1000;
var days=Math.floor(totalSecs/3600/24);
var hours=Math.floor((totalSecs-days*24*3600)/3600);
var mins=Math.floor((totalSecs-days*24*3600-hours*3600)/60);
var secs=Math.floor((totalSecs-days*24*3600-hours*3600-mins*60));
if (days != 0 ) {
document.getElementById("thenThen").innerText="【答题时间:" days "天" hours "小时" mins "分钟" secs "秒";
}else if (hours == 0 && mins == 0) {
document.getElementById("thenThen").innerText="【答题时间:" secs "秒";
}else if (hours == 0 && mins != 0) {
document.getElementById("thenThen").innerText="【答题时间:" mins "分钟" secs "秒";
}else if (hours != 0) {
document.getElementById("thenThen").innerText="答题时间:"hours "小时" mins "分钟" secs "秒";
}
}
var 时钟;
window.onload=function(){
clock=self.setInterval("thenThen()", 500);
}
脚本>
头>
<身体>
身体>