,{field:'name', title: '链接名称', width:180, edit: 'text',style:'font-size: 12px;'}
//监听单元格编辑
table.on('edit(table)', function(obj){
var value = obj.value //得到修改后的值
,data = obj.data //得到所在行所有键值
,field = obj.field; //得到字段
//layer.msg('[ID: '+ data.id +'] ' + field + ' 字段更改为:'+ value);
table_edit_update(data.id,field,value);
});
function table_edit_update(id,field,value){
$.post('/admin/link/update?'+field+'='+value,{id:id},function(result){
if(result.success){
layer.msg('修改成功');
}else{
layer.closeAll();
layer.msg(result.msg);
}
},'json');
}
站长微信:xiaomao0055
站长QQ:14496453