JavaScript simple some ....

Source: Internet
Author: User

<!DOCTYPE HTML><HTMLLang= "en"><Head>    <MetaCharSet= "UTF-8">    <title>Send Verification Code</title>    <styletype= "Text/css"></style>    <Script>        varGo_time;//define a variable to accept the return value of the timer        functionSetint_butt () {//Create an onclick time function            //Define a timerGo_time=SetInterval ("Identifying ()", +); }                var Time=  -;//Define a time initial value        functionidentifying () {//Get Time Label Object             varNum=document.getElementById ("Num"); Num.innerhtml="<font color=red size=2 >"+ Time+"seconds after resend </font>"; //Get Button Label Object Properties             varButt=document.getElementById ("Butt"); Butt.disabled= "Disabled"; --Time ; if( time<0){//determine the state of timenum.innerhtml= "";//Modify the status of Numbutt.disabled= "";//change the state of a button Time=  -; //Restore the initial value of timeclearinterval (go_time);//Clear Timer             }        }    </Script></Head><Body>    <inputID= "text"type= "text"></input>    <spanID= "num"></span>&ensp;    <ButtonID= "Butt"onclick= "Setint_butt ()">Send Verification Code</Button></Body></HTML>

JavaScript simple some ....

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.