confirm() method
The confirm() method is used to display a dialog box with the specified message and OK and Cancel buttons.
Description: confirm() returns true if the user clicks the OK button. If the cancel button is clicked, confirm() returns false
A:
Two types:
< ;a href="Delete.aspx" onClick="delete_confirm">Delete
Three types:
if(window.confirm('Are you sure you want to cancel the transaction?')){
//alert("OK" );
return true;
}else{
//alert("Cancel");
return false;
}
Four kinds:
A simpler method that I often use
, simpler: