作者:书友67696238 | 来源:互联网 | 2023-09-15 09:30
一、引入插件
插件版本号对应
搜索关键字:bootbox的cdn
二、js使用
$('#execute').click(function () {
bootbox.prompt({
size: "small",
title: "执行次数",
value: "1",
callback: function (result) {
if (result === null) {
var times = 1;
} else {
var times = result;
}
var moa_pb = $("#moa_pb").val();
var moa_ip = $("#moa_ip").val();
var moa_req = $('#moa_req').val();
$.ajax({
url: "/ctest/moa_execute/",
type: "post",
data: {
"moa_pb": moa_pb,
"moa_ip": moa_ip,
"moa_req": moa_req,
"times": times,
},
success: function (data) {
// alert(data.rsp)
$('#moa_rsp').val(data.rsp);
},
error: function () {
}
});
}
});