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:
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn