In some cases, in the project, we need confirmation from the users. like if users are trying to delete any data from the database. to confirm that want to delete the data. we can use the jQuery confirm box. and where the user can confirm his choise.
jQuery confirm()
, which displays a prompt and returns true
or false
based on what the user decided:
if (confirm('Are you sure you want to save this thing into the database?')) {
// Save it!
console.log('Thing was saved to the database.');
} else {
// Do nothing!
console.log('Thing was not saved to the database.');
}
Hello Friends, I’m Mohit Sharma founder of tutrialwala.com, Full Stack Web Developer. Expertise in WordPress, PHP, Laravel, Angular, and Frontend Development. In this publication, I share everything I know about PHP frameworks and Javascript frameworks, packages, and tools.
Have a project in mind? Get in touch