欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

bootstrap table 數(shù)據(jù)表格行內(nèi)修改的實(shí)現(xiàn)代碼

 更新時(shí)間:2017年02月13日 16:35:55   作者:衣兜里  
這篇文章主要介紹了bootstrap table 數(shù)據(jù)表格行內(nèi)修改的實(shí)現(xiàn)代碼,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下

js中設(shè)置列的屬性 editable :

{
type : 'text',//數(shù)據(jù)顯示在文本框內(nèi)
emptytext : "--",//數(shù)據(jù)為空時(shí)顯示
validate : function(value) {
if ($.trim(value) == '') {
return '不能為空';//修改是數(shù)據(jù)為空 顯示
}
}
}

js中設(shè)置bootstrop-table加載數(shù)據(jù)時(shí)屬性

onEditableSave : function(field, row, oldValue, $el) {
$('#id').bootstrapTable('resetView');
row = dataWarp(row, field);// 編輯時(shí)重新包裝數(shù)據(jù) 可寫(xiě)可不寫(xiě)
$.ajax({
type : "post",
url : 路徑,
data : row,//行內(nèi)修改后的數(shù)據(jù)
dataType : 'JSON',
success : function(data, status) {
if (status == "success") {
Modal.alert({
msg : "編輯成功!"
});
}
},
error : function() {
Modal.alert({
msg : "編輯失??!"
});
$('#id').bootstrapTable('refresh');// 數(shù)據(jù)加載成功后刷新
},
complete : function() {
}
});
}

以上所述是小編給大家介紹的bootstrap table 數(shù)據(jù)表格行內(nèi)修改的實(shí)現(xiàn)代碼,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!

相關(guān)文章

最新評(píng)論