- }
- time(this);
- document.getElementById("btn").onclick=function(){
- }
- }
- }
- },1000)
- time(o)
- setTimeout(function() {
- wait--;
- o.value="重新发送(" + wait + ")";
- o.className = "set";
- o.setAttribute("disabled", true);
- else{
- }
- },1000)
- time(o)
- setTimeout(function() {
- wait--;
- o.value="重新发送(0"+wait+")";
- if(wait<10){
- else {
- }
- wait = 12;
- o.value="免费获取验证码";
- o.className = "";
- o.removeAttribute("disabled");
- if (wait == 0) {
- function time(o) {
- var wait=12;
- }
- color: #fff;
- background: #666;
- #btn.set {
- }
- color: #000;
- width: 150px;
- height: 50px;
- margin: 100px auto;
- color: #fff;
- font-weight: bold;
- font-size: 18px;
- text-align: center;
- border-radius: 20%;
- background: #fff;
- #btn{
- *{ margin: 0; padding: 0}
来源: http://www.w3cfuns.com/notes/17965/25f1beac03a6f1966dde520a6b4a8fad.html