你好我想当我的倒计时结束时它应该给出:
document.getElementById("remain").innerHTML = "Time up";
现场倒计时:http: //ffsng.deewayz.in/counter/
当它即将结束时,我想放出那个“时间到了”
我用这种方式尝试了一些东西,但效果很好。
function setCountDown() {
seconds--;
if (seconds < 0) {
minutes--;
seconds = 59;
}
if (minutes < 0) {
hours--;
minutes = 59;
}
if (hours < 0) {
days--;
hours = 23;
}
document.getElementById("remain").innerHTML = days + " days, " + hours + " hours, " + minutes + " minutes, " + seconds + " seconds";
if ((seconds = 0) && (minutes = 0) && (hours = 0) && (days = 0))(
document.getElementById("remain").innerHTML = "time up";
) else (
setTimeout("setCountDown()", 1000);
);
}
我的完整代码在这里:倒数计时器不适用于格林威治标准时间