阅读用户需知时, 同意按钮设置在5秒后可用
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="About.aspx.cs" Inherits="About" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" >
- <head runat="server">
- <title>无标题页</title>
- <script language="javascript" type="text/javascript">
- var time = 5;
- function next()
- {
- if(time==0)
- {
- document.all.Button1.disabled = false;
- document.all.Button1.innerText= "下一步";
- }
- else
- {
- document.all.Button1.innerText= "下一步("+time+")";
- time--;
- }
- }
- setInterval("next()",1000);
- </script>
- </head>
- <body onload="next()">
- <form id="form1" runat="server">
- <div>
- 用户注册协议...<br />
- <br />
- <asp:CheckBox ID="chkOK" Text="同意协议" runat="server" />
- <asp:Label ID="Label1" runat="server" ForeColor="Red" Width="186px"></asp:Label><br />
- <input type="button" id="back" value="上一步" onclick="history.go(-1)" />
- <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Enabled="False" /></div>
- </form>
- </body>
- </html>