使用jquery.datatable进行服务器端分页,可以实现,但有个问题,比如每页显示10条数据,我翻页到第三页,左下角信息会显示"当前显示 21 到 30 条,共 1034 条记录",问题来了,我输入查询条件进行查询,因数据条数少,比如5条,结果信息就会显示为"当前显示 21 到 5 条,共 5 条记录",这样显示明显有问题,请高手指教!
页面代码如下,请求url,返回json数据function getData_json(){
var url='/ContentManager/getContentsDataList?contentName='+encodeURI($('#txtSearch').val());
$('#example').dataTable( {
    "bAutoWidth":false,
"bDestroy":true,
"bProcessing":true,
"bServerSide": true, //开启服务端处理模式
"bStateSave": true,
"sPaginationType": "full_numbers",
"bSortClasses": false,
"bFilter": false, //搜索栏
"bSort": true,
"bInfo": true,
"oLanguage": {
"sLengthMenu": "&{'sLengthMenu'}",
     "sZeroRecords": "&{'sZeroRecords'}",
     "sInfo": "&{'sInfo'}",
     "sInfoEmpty":"&{'sInfoEmpty'}",
     "sInfoFiltered": "&{'sInfoFiltered'}",
     "sProcessing":"&{'sProcessing'}",
     "sSearch": "&{'sSearch'}",
     "oPaginate": {
          "sFirst":    "&{'sFirst'}",
          "sPrevious": "&{'sPrevious'} ",
          "sNext":     "&{'sNext'} ",
          "sLast":     "&{'sLast'}"
      }
  },
"sAjaxSource":url,
"aaSorting": [[0, "asc" ]],
"aoColumns": [ 
            {"mData":"contentname"},
            {"mData":"rener"},
            {"mData":"lastVersionNumber"},
            {"mData":"examineState"},
            {"mData":"contentid"}
 ]
});
}
jquerydatatable服务器端分页JavaScript