刚开始是在 $.bootstrapTable({});里面加了这个,发现不起作用
onEditableSave: function (field, row, oldValue, $el) {
console.log("Come in?");
$.ajax({
type: "post",
url: "/exteriorExamine/editable.action",
data: {supplierSupplierName:row.supplier_supplierName, exteriorManagePurchaseNo:row.exteriorManage_purchaseNo},
dataType: 'JSON',
success: function (status) {
if (status == "success") {
alert('提交数据成功');
}
},
error: function () {
alert('编辑失败');
},
});
},
后面改成了在$().ready(function () {});里面加这个就可以了
$("#table").on("editable-save.bs.table", function ( $el, field,row,oldValue) {
console.log("Come in?");
$.ajax({
type: "post",
url: "/exteriorExamine/editable.action",
data: {supplierSupplierName:row.supplier_supplierName, exteriorManagePurchaseNo:row.exteriorManage_purchaseNo},
dataType: 'JSON',
success: function (result) {
if (result == "success") {
alert('提交数据成功');
}
},
error: function (error) {
alert('编辑失败');
},
});
});