【发布时间】:2021-07-09 16:59:19
【问题描述】:
function confirmation() {
swal.fire({
title: "Are you sure?",
text: "Your about to delete some files",
type: "warning",
showCancelButton: true,
showConfirmButton: true,
confirmButtonText: 'Yes, I am sure!',
cancelButtonText: "No, cancel it!",
closeOnConfirm: false,
closeOnCancel: false
}).then((result) => {
if (result.isConfirmed) {
swal.fire("Deleted!", "files are successfully deleted!", "success");
} else {
window.location = "....";
}
});
}
但即使我确认或否认它只是取消我能做什么?
我也尝试使用isDenied,但仍然没有。
【问题讨论】:
标签: javascript php sweetalert2