2010-08-15 62 views

回答

5

您可以使用confirm功能:

if (confirm('Are you sure you want to delete this item?')) { 
    // TODO : the user confirmed 
} 

正如您所标记你的问题与ASP.NET:

<asp:LinkButton 
    ID="DeleteButton" 
    runat="server" 
    CommandName="Delete" 
    Text="Delete" 
    OnClientClick="return confirm('Are you sure you want to delete this item?');" 
/> 
+0

嘿感谢的人:) – BreakHead 2010-08-15 08:24:33