Source: http://hi.baidu.com/yuanxiangyi/blog/item/961b3bd16411cb389a502758.html
How many seconds does it take to register the JavaScript code before you can click the specified JS control button to make it available and unavailable! <HTML>
<Head>
<Title> </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
</Head>
<Body>
<Form name = "bbrules">
<Input type = "Submit" name = "rulesubmit" style = "height: 23px;" value = "agree"/>
</Form>
<Script language = "JavaScript">
<! --
// This JS segment must be placed under the form
VaR secs = 2;
VaR wait = secs * 1000;
Document. bbrules. rulesubmit. value = "Italian (" + secs + ")";
Document. bbrules. rulesubmit. Disabled = true;
For (I = 1; I <= secs; I ++)
{
Window. setTimeout ("Update (" + I + ")", I * 1000 );
}
Window. setTimeout ("timer ()", wait );
Function Update (Num, value)
{
If (num = (wait/1000 ))
{
Document. bbrules. rulesubmit. value = "agree ";
}
Else
{
Printnr = (wait/1000)-num;
Document. bbrules. rulesubmit. value = "Italian (" + printnr + ")";
}
}
Function timer ()
{
Document. bbrules. rulesubmit. Disabled = false;
Document. bbrules. rulesubmit. value = "agree ";
}
-->
</SCRIPT>
</Body>
</Html>