gistfile1.txt //发送验证码 重发倒计时var countdown=60; function settime(obj) { if (countdown == 0) { obj.removeAttribute("disabled"); obj.value="发送验证码"; countdown = 60; return; } else { obj.setAttribute("disabled", true)
//发送验证码 重发倒计时 var countdown=60; function settime(obj) { if (countdown == 0) { obj.removeAttribute("disabled"); obj.value="发送验证码"; countdown = 60; return; } else { obj.setAttribute("disabled", true); obj.value="重发(" + countdown + ")"; countdown--; } setTimeout(function() { settime(obj) } ,1000) }