The content of this section:
Javascript implements the Click button Countdown 60 seconds before you can click the effect of the send again.
For example, some websites on the mobile phone message authentication function, there is similar to implement the Click button, countdown 60 seconds to click the effect of sending again.
This article uses JavaScript to implement the Click button, countdown 60 seconds to re-click the ability to send verification code.
Example:
Copy Code code example:
<input type= "button" id= "btn" value= "Get Verification Code free"/>
<script type= "Text/javascript" >
var wait=60;
function Time (o) {
if (wait = = 0) {
O.removeattribute ("Disabled");
O.value= "Free access to verification code";
wait = 60;
} else {//www.jbxue.com
O.setattribute ("Disabled", true);
O.value= "Resend (" + Wait + ")";
wait--;
SetTimeout (function () {
Time (O)
},
1000)
}
}
document.getElementById ("Btn"). Onclick=function () {time (this);}
</script>
< /span>