-1
我正在使用JQuery確認進行刪除。當我點擊按鈕時,我需要執行查詢。單擊動態按鈕時執行php代碼
這裏是確認代碼:
function DeleteButton() {
$.confirm({
title: 'Some Title',
content: 'Are you sure want to delete ',
icon: 'fa fa-question-circle',
animation: 'scale',
closeAnimation: 'scale',
opacity: 0.5,
buttons: {
'confirm': {
text: 'Proceed',
btnClass: 'btn-blue',
action: function() {
}
},
cancel: function() {
$.alert('you clicked on <strong>cancel</strong>');
},
}
});
}
點擊時,我繼續需要執行一些PHP代碼。我該怎麼做?
發送ajax請求以執行該功能 –
Ajax請求接受類型(GET/POST等)和url。使用URL將數據發送到您的PHP腳本。 –