标签:html logs disable cli type highlight timeout htm var
var wait=60; function settime(o) { if (wait == 0) { o.removeAttribute("disabled"); o.value="发送验证码"; wait = 60; } else { o.setAttribute("disabled", true); o.value="重新发送(" + wait + ")"; wait--; setTimeout(function() { settime(o) }, 1000) } }
<input id="btn" onclick="settime(this)" class="" type="button" value="发送验证码" />
标签:html logs disable cli type highlight timeout htm var
原文地址:http://www.cnblogs.com/yyou/p/7028833.html