<script type="text/javascript">
var wait=60;
document.getElementById("btn").disabled = false;
function time(o) {
if (wait == 0) {
o.removeAttribute("disabled");
o.value="获取验证码";
wait = 60;
} else {
o.setAttribute("disabled", true);
o.value="重新发送(" + wait + ")";
wait--;
setTimeout(function() {
time(o)
},
1000)
}
}
document.getElementById("btn").onclick=function(){time(this);}
</script>
<input type="submit" value="获取验证码" name="agreeb" id="btn">
时间: 2024-11-07 23:47:03