[转载]获取验证码60秒倒计时
var countdown = 60;
function settime() {
var val = $("#<%=this.btnGetCode.ClientID %>");
if (countdown == 0) {
val.removeAttr("disabled");
val.val("获取验证码");
countdown = 60;
return;
}
else {
val.attr("disabled", true);
val.val("重新发送(" + countdown + ")");
countdown--;
}
setTimeout(function() {
settime(val)
}, 1000)
}