您好,我才刚刚开始学习Web开发,如果您可以帮助我,那就太好了
如何在此代码上放入bootbox确认。我尝试了很多次,但是显示出错误,例如输入不正确。
$(".approveBtn").click(function (e) {
e.preventDefault();
if (checkRequired("#propertyForm, #uploadcon, #propertyForm2")) {
var btn = $(this)
var serial = $("#propertyForm").serialize();
$.ajax({
type: "POST",
url: base_url + "admin_t/approve_dec",
data: serial,
beforeSend: function () {
btn.prop('disabled', true)
btn.html('<i class="fa fa-spinner"></i>')
},
success: function (data) {
if (data.success == 1) {
tct();
upload_docu_by_type(data.prop_id, 'cert_title', 1);
upload_docu_by_type(data.prop_id, 'tax_dec', 2);
upload_docu_by_type(data.prop_id, 'rpt_receipt', 3);
upload_docu_by_type(data.prop_id, 'other_doc', 4, true);
$.toast({
heading: 'Success',
text: 'Property Successfully Saved',
icon: 'success',
loader: false,
stack: false,
position: 'top-center',
allowToastClose: false,
bgColor: 'green',
textColor: 'white',
hideAfter: 6000,
afterHidden: function () {
location.href = base_url + "/main/tax_dec/" + token
}
});
} else {
toast_note(data.message)
}
},
error: function (a, b, c) {
toast_error(c)
},
complete: function () {
// btn.prop('disabled', false);
btn.html('Save Details')
}
});
}});
我已经搜索了文档。我的问题只是引导箱在}});