DataTable初次使用基于Java后台
环境:Java后台,MySql数据库,DataTable版本3.1.0,Mac Pro Book,EL Capitan
业务场景:多条件混合服务端分页查询产品
HTML代码部分
批操作
var allltable = $("#all_TabGrid");
allltable.DataTable({
ajax: {
"url": "/ProductWeb/servlet/ProductServlet",
"type": "POST",
"data": function (d) {
d.pageNo = $("#all_TabGrid").DataTable().page()+1;
d.NAME = $("#searchStoreVal").val();
d.LINKMOBILE = $("#searchStoreTelVal").val(),
d.CODE = $("#searchStoreCodeVal").val();
}
},
info:true,
//"iDisplayLength" : 40,
"paging": true,
"ordering": false,
//"deferRender": true,
"columns": [
{"data":"ID","render":function (data, type, full, meta) {
return " ";
}},
{"data": "null","render":function (data, type, full, meta) {