Js implements the countdown to the user registration protocol, and js User Registration
This article describes how to implement the countdown of the User Registration Protocol in js. Share it with you for your reference. The specific implementation method is as follows:
Copy codeThe Code is as follows: <Head>
<Title> Registration </title>
<Script type = "text/javascript">
// The user has 10 seconds to view the Protocol. After 10 seconds, the "agree" button will take effect.
Var Seconds = 10;
// Timer ID
Var setIntervalID;
Function OK (){
Var getid = document. getElementById ("");
If (Seconds <= 0 ){
Getid. value = "agree ";
Getid. disabled = false; // Alternatively, use getid. disabled = ""; to enable the getid control.
// Stop the timer
ClearInterval (setIntervalID );
}
Else {
Getid. value = "Please carefully read the agreement and the remaining [" + Seconds + "] Seconds ";
}
Seconds --;
}
SetIntervalID = setInterval ("OK ()", 1000 );
</Script>
</Head>
<Body>
<Textarea cols = "20" rows = "8"> </textarea> <br/>
<! -- Disabled = "disabled" the default submit form is disabled, that is, read-only, and cannot be clicked. -->
<Input type = "submit" id = "but" value = "agree" disabled = "disabled"/>
</Body>
</Html>
I hope this article will help you design javascript programs.