A note about usage and some tiny fixes. (#28689)
This commit is contained in:
@ -13,7 +13,9 @@ if (window.confirm("Are you sure you want to delete this item?")) {
|
||||
}
|
||||
```
|
||||
|
||||
The message "Are you sure you want to delete this item?" will appear in the dialog box. If the user clicks OK, the confirm method will return `true` and the browser will run the code inside the if statement. If he or she clicks Cancel, the method will return `false` and nothing else will happen. This provides some protection against someone accidentally clicking Delete.
|
||||
The message "Are you sure you want to delete this item?" will appear in the dialog box. If the user clicks "OK", the confirm method will return `true` and the browser will run the code inside the if statement. If the user clicks "Cancel" or the close button(x) in the top right corner, the method will return `false` and nothing else will happen. This provides some protection against someone accidentally clicking Delete.
|
||||
|
||||
**Note**: This method takes the focus away from the current window as it prevents the user from accessing other parts of the page until the box is closed.
|
||||
|
||||
#### More Information:
|
||||
<a href='https://developer.mozilla.org/en-US/docs/Web/API/Window/confirm' target='_blank' rel='nofollow'>MDN Docs</a>
|
||||
|
Reference in New Issue
Block a user