2010-08-15 35 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