js倒计时
var wait = 60; function time(b) { if (wait == 0) { b.removeAttribute("disabled","disabled"); b.removeAttribute('style','color:white'); b.value="免费获取验证码"; wait = 60; } else { b.setAttribute("disabled", "disabled"); b.setAttribute('style','color:white'); b.value="重新发送(" + wait + ")"; wait--; setTimeout(function() {time(b)}, 1000) } }