返回的数据是
处理到表格中
tables.dataTable( {
"sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
"sPaginationType": "bootstrap",
"oLanguage": {
"sLengthMenu": "每页显示 _MENU_ 条记录",
"sInfo": "从 _START_ 到 _END_ /共 _TOTAL_ 条数据",
"oPaginate": {
"sFirst": "首页",
"sPrevious": "前一页",
"sNext": "后一页",
"sLast": "尾页"
},
"sZeroRecords": "抱歉, 没有找到",
"sInfoEmpty": "没有数据"
},
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/chatwords/list",
"aoColumns": [
{ "mData": "Id" },
{ "mData": "Serviceid" },
{ "mData": "Words" },
{ "mData": "Wordstype" },
{ "mData": function(obj){
if(obj.Isshare){
return "共享";
}else{
return "个人";
}
}},
{ "mData": function(obj){
return '<a data-toggle="modal" data-target="#myModal" data-title="' + obj.Id + '" class="btn btn-success" href="#"><i class="icon-edit icon-white"></i>修改</a>' +' '+'<a data-title="' + obj.Id + '" class="btn btn-danger" href="#"><i class="icon-user icon-white"></i>删除</a>';
}}
],
"fnServerParams": function ( aoData ) {
aoData.push( { "name": "sid", "value": sid } );
}
});