javascript 倒计时
程序员文章站
2022-03-02 10:55:06
...
var hhhh = 300;
(function daoJiShi() {
var ofm = parseInt((hhhh % 3600) / 60);
var ofs = hhhh % 60;
document.getElementById('timer').innerHTML = '<font size="3" face="微软雅黑" color="RGB(248,248,58)">制品正在解析中,还有 </font>'
+ '<font size="3" face="微软雅黑" color="red">'+ofm +'</font>'
+ '<font size="3" face="微软雅黑" color="RGB(248,248,58)"> 分钟 </font>'
+'<font size="3" face="微软雅黑" color="red">'+ofs+'</font>'
+ ' <font size="3" face="微软雅黑" color="RGB(248,248,58)">秒,请稍候...</font>';
if (ofs < 0) {
document.getElementById('timer').innerHTML = '<font size="3" face="微软雅黑" color="RGB(248,248,58)">倒计时结束!</font>';
return;
}
;
hhhh = hhhh - 1;
setTimeout('daoJiShi()', 1000);
}());
上一篇: Intersecting Lines POJ - 1269
下一篇: 倒计时JavaScript