<body>
<div id="we">4</div>s
<script>
window.onload = function(){
var we = document.getElementById("we")
console.log(we.innerHTML);
var int=setInterval(function(){
we.innerHTML--;
if(we.innerHTML==0){
clearInterval(int);
}
},1000);
}
</script>
</body>
就这么点东西。
原文地址:https://www.cnblogs.com/lieaiwen/p/8360092.html
时间: 2024-10-15 19:20:26