javascript - How to create a dialog with “Ok” and “Cancel” options

Published: 04 March 2023
on channel: Code Samples
325
5

#short
#javascript
#dialog
I am going to make a button to take an action and save the data into a database.
Once the user clicks on the button, I want a JavaScript alert to offer “yes” and “cancel” options. If the user selects “yes”, the data will be inserted into the database, otherwise no action will be taken.
How do I display such a dialog?
confirm(): https://developer.mozilla.org/en-US/d...


Watch video javascript - How to create a dialog with “Ok” and “Cancel” options online without registration, duration hours minute second in high quality. This video was added by user Code Samples 04 March 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 325 once and liked it 5 people.