js 倒计时

function Bountclick() {
var time = 60;//s
var start = window.setInterval(function () {
time = time - 1;
console.log(time);
$("#show").val(time);

document.getElementById('show').innerHTML = '计时开始,' + time + '秒后跳转!';
if (time == 10) {
window.clearInterval(start);

}
}, 1000);
}

posted @ 2022-01-12 21:17  大黄人  阅读(17)  评论(0编辑  收藏  举报