我使用的是 Jquery Confirmation 插件,但我对单击“确认”按钮时如何提交表单感到困惑。这是我的代码:
$(function() {
$("button[name='btn-delete-akun']").confirm({
title: '<p style="color:red;"> <span class="glyphicon glyphicon-warning-sign" aria-hidden="true"></span> Peringatan!<p>',
content: 'Apakah anda yakin ingin menghapus event? ',
useBootstrap: true,
buttons: {
Confirm: {
btnClass: 'btn-red',
//how to submit form if i click this confirmation button
},
Cancel: function() {}
}
});
});
谢谢。
最佳答案
你试过吗?
buttons: {
Yes: function () {$('#yourForm').submit()},
No: function () {}
}
关于javascript - 提交带有 jquery 确认的表单,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48399613/