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