如何将数据从ajax设置为bootbox对话框?或者我需要使用jquery ui对话框,何时需要设置一些数据?
此代码无效
bootbox.dialog({
message: data,
title: "Custom title",
buttons: {
success: {
label: "Success!",
className: "btn-success",
},
}
});
答案 0 :(得分:34)
jQuery.ajax({
type: 'POST',
url: $(this).attr('href'),
success: function(data) {
bootbox.dialog({
message: data,
title: "Custom title",
buttons: {
success: {
label: "Success!",
className: "btn-success",
},
}
});
}
});