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);
}

原文地址:https://www.cnblogs.com/lyq666666/p/15795353.html