62,025
社区成员
发帖
与我相关
我的任务
分享
<asp:Button runat=server CssClass="enter" Text="获取验证码" ID="yan" name="yan" OnClick="yan_onClick" style="width:40%;" />
<script type="text/javascript">
var wait=45;
document.getElementById("yan").disabled = false;
function time(o) {
if (wait == 0) {
o.removeAttribute("disabled");
o.value="免费获取验证码";
wait = 5;
} else {
o.setAttribute("disabled", true);
o.value="重新发送(" + wait + ")";
wait--;
setTimeout(function() {
time(o)
},
1000)
}
}
document.getElementById("yan").onclick=function(){time(this);}
</script>