<div>
<button class="b1" id="button1" ></button>
<button class="b1"> 退出 </button>
</div>
<script type="text/javascript">
var times =60;
for(var i=0;i<61;i++){
window.setTimeout("daojishi("+i+")",i*1000);
}
function daojishi(num) {
var button1 = document.getElementById("button1");
if (num == times) {
button1.innerHTML="我要写信";
button1.disabled=false;
} else {
var sj = times - num;
button1.innerHTML = "请认真查看<来信须知>(" + sj + "秒)";
button1.disabled=true;
}
}
</script>
倒计时60秒
最新推荐文章于 2024-11-18 13:12:27 发布