alerte jQuery avec oui non
if (confirm('Are you sure ?')) {
console.log('ok');
}else
{
console.log('cancel')
}
Agreeable Angelfish
if (confirm('Are you sure ?')) {
console.log('ok');
}else
{
console.log('cancel')
}
var response = confirm("Confirm Combine?");
if (response == true) {
//do something
}
$("#complexConfirm").confirm({
title:"Delete confirmation",
text:"This is very dangerous, you shouldn't do it! Are you really really sure?",
confirm: function(button) {
alert("You just confirmed.");
},
cancel: function(button) {
alert("You aborted the operation.");
},
confirmButton: "Yes I am",
cancelButton: "No"
});
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.2/jquery-confirm.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.2/jquery-confirm.min.js"></script>