CSDN上的接受协义时确定按钮到记时的js.

 <form name="RegTermsForm" method="get">
           <input class="Button" type="submit" value="同意" name="btnSubmit">
         </form>
        
      <script language="javascript" type="text/javascript">
      <!--
       var secs = 9;
       var wait = secs * 1000;
       document.RegTermsForm.btnSubmit.value = "同意 (" + secs + ")";
       document.RegTermsForm.btnSubmit.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.RegTermsForm.btnSubmit.value = "同意";
        }
        else
        {
         printnr = (wait / 1000) - num;
         document.RegTermsForm.btnSubmit.value = "同意 (" + printnr + ")";
        }
       }
       
       function Timer()
       {
        document.RegTermsForm.btnSubmit.disabled = false;
        document.RegTermsForm.btnSubmit.value = "同 意";
       }
      -->
      </script>

你可能感兴趣的:(CSDN上的接受协义时确定按钮到记时的js.)