📅  最后修改于: 2022-03-11 15:02:07.290000             🧑  作者: Mango
var time = 1;
var interval = setInterval(function() {
if (time <= 3) {
alert(time);
time++;
}
else {
clearInterval(interval);
}
}, 5000);