settime(); var countdown = 60; function settime() { if (countdown == 0) { $("#smscodebtn").attr("disabled",false); $("#smscodebtn").html("获取验证码"); countdown = 60; return; } else { $("#smscodebtn").attr("disabled", true); $("#smscodebtn").html("" + countdown + "秒后再获取"); countdown--; } setTimeout(function () { settime() }, 1000) }
本文为看恩吧原创文章,转载无需和我联系,但请注明来自knsay.com