一)簡單點的如要在一個按鈕上增加認證腳本,可以這樣 複製程式碼 程式碼如下: <br><br>function getconfirm ()<BR>{<BR>{<BR> if (confirm("Do you want to delete record?")==true) <BR> return true;<BR> else<br> return false; ><br><script runat="server"><BR>public void Page_Load(Object sender, EventArgs E) {<br>btnSubmit.Attributes.Add("onclick","return getconfirm ();");<br>}<BR>void btnSubmit_Click(object sender, EventArgs e) {<BR> Message.Text = "You entered your name as: " txtName.Text;<BR>}<BR> ><BR><head><BR><BR><body><BR><form runat="server"><BR> Name: <asp:Textbox id="txtName" runat="server" /><BR><asp:Button id="btnSubmit" onclick="btnSubmit_Click" runat="server" Text="Submit"><br/><BR><asp:Label id=" Message" runat="server"/><BR><BR>