0
このajaxリクエストを実行する前に確認ボックスを表示する必要があります。レコードを削除する前に確認ボックスを表示する方法
$(document).on("click", ".deletecustomer", function() {
var id = $(this).attr("id");
$.ajax({
method: "post",
url: "deletecustomer.php",
data: {
id: id
},
success: function(data) {
console.log(data);
if (data == "success") {
window.location.href = "customer.php";
}
}
});
});
''(確認( 'あなたはよろしいですか?')){/ *アヤックス* /}もし? – Qirel