<input type= "button" id= "btn" value= "Free Verification Code" onclick= "SetTime (This)"/>
<script type= "Text/javascript" >
var countdown=60;
function SetTime (val) {
if (countdown = = 0) {
Val.removeattribute ("Disabled");
Val.value = "Free access to verification code";
Countdown = 60;
} else {
Val.setattribute ("Disabled", true);
Val.value= "Resend (" + Countdown + ")";
countdown--;
}
SetTimeout (function () {settime (val)},1000)
}
</script>
JS Countdown
<title> Countdown Effect </title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
<meta name= "keywords" content= ""/>
<meta name= "description" content= ""/>
<script language= "JavaScript" >
var totalminutes = 5;
var totalmilliseconds = 5*60*1000;
function Takecount ()
{
Count Minus One
TotalMilliseconds-= 1000;
Counting seconds
var hours = Math.floor (TotalMilliseconds/(1000 * 60 * 60))% 24;
var minutes = Math.floor (TotalMilliseconds/(1000 * 60))% 60;
var seconds = math.floor (totalmilliseconds/1000)% 60;
Insert hours and seconds into HTML
document.getElementById ("Remainh"). InnerHTML = hours;
document.getElementById ("REMAINM"). InnerHTML = minutes;
document.getElementById ("remains"). InnerHTML = seconds;
}
Window.onload = SetInterval ("Takecount ();", 1000);
</script>
<body>
<div id= "Countmsg" >
The countdown also has:
<strong id= "Remaind" ></strong><strong id= "Remainh" >XX</strong>
<strong id= "remainm" >XX</strong> min
<strong id= "remains" >XX</strong> sec
</div>
</body>
60 Seconds Countdown