Verification Code Countdown
1 <HTMLxmlns= "http://www.w3.org/1999/xhtml">2 <Head>3 <title>Verification Code Countdown</title>4 <Scriptsrc= "Http://code.jquery.com/jquery-latest.js"></Script>5 <style>6 . Zc_submit{7 Height:35px;8 Line-height:35px;9 background:#AA0000;Ten Display:Block; One width: the; A Color:#FFFFFF; - font-size:0.8em; - text-align:Center; the Box-shadow:inset 0 0 1px #AA0000; - Border:0px solid #AA0000; - box-sizing:Border-box; - } + </style> - <Scripttype= "Text/javascript"> + varwait= 5; A functionSendcode () { at if(Wait== 5) {time (); Getsmscode (); } - Else { }; - } - functionTime () { - var$ALink= $("#Getcode"); - if(Wait== 0) { in $ALink. CSS ('Background-color', '#AA0000'); - document.getElementById ("GetCode"). InnerHTML= "Get Verification Code:"; to $ALink. Click (function () { + Sendcode (); - }); the wait= 5; * } Else { $ $ALink. CSS ('Background-color', '#666666');Panax Notoginseng document.getElementById ("GetCode"). InnerHTML=wait+ "seconds to get back"; - wait--; the SetTimeout (function () { + document.getElementById ("GetCode"). onclick= function () { A return false; the } + Time (); - }, $ +) $ } - } - </Script> the - </Head>Wuyi <Body> the <aclass= "Zc_submit"Herf="#"ID= "GetCode"onclick= "Sendcode ();"style= "width:152px">Get Verification Code:</a> - <inputname= "Code"ID= "Code"type= "text"placeholder= "SMS delivery may be delayed by 3-5 minutes due to carrier network"> Wu </Body> - </HTML>View Code
Verification Code Countdown