倒计时点击
2025年8月24日小于 1 分钟
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>倒计时点击</title>
</head>
<body>
<button id = 'but' disabled>10</button>
<script type="text/javascript">
var but = document.getElementById('but');
//var i = 10;
var into = setInterval(function(){
//i--;
//but.innerHTML = i;
var i = parseInt(but.textContent);
i--;
but.innerHTML = i;
if(i <= 0) {
but.innerHTML = '请点击';
but.removeAttribute('disabled');
clearInterval(into);
}
},1000)
</script>
</body>
</html>