Javascript jQuery datatables类型错误:b为空
我在使用jquery datatables插件时遇到了Firebug引发的错误 表格如下:Javascript jQuery datatables类型错误:b为空,javascript,jquery,datatable,Javascript,Jquery,Datatable,我在使用jquery datatables插件时遇到了Firebug引发的错误 表格如下: <table id="dt_cursuri" class="table table-striped table-bordered dTableR"> <thead> <tr>
<table id="dt_cursuri" class="table table-striped table-bordered dTableR">
<thead>
<tr>
<th data-class="expand">Curs</th>
<th data-hide="phone,tablet" data-name="Assign">Domeniu</th>
<th>Tip</th>
<th>Data modif</th>
<th class="centered-cell">Actiuni</th>
</tr>
</thead>
<tbody>
<tr>
<td class="dataTables_empty" colspan="6">Fetching data from server</td>
</tr>
</tbody>
</table>
感谢jQuery数据表的开发人员,我将自己回答这个问题。
问题出在服务器端处理中。当使用变音符号时,datatable会弄乱数据,因此您必须使用utf8_encode php函数实际控制变音符号感谢jQuery Datatables的开发人员,我将自己回答这个问题。 问题出在服务器端处理中。使用变音符号时,datatable会弄乱数据,因此您必须使用utf8_encode php函数实际控制变音符号
var oTable;
var responsiveHelper = undefined;
var breakpointDefinition = {
tablet: 1024,
phone : 480
};
var oTable = $('#dt_cursuri');
oTable = $('#dt_cursuri').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sPaginationType": "bootstrap",
"sDom": "<'row'<'col-md-6'l><'col-md-6'f>r>t<'row'<'col-md-6'i><'col-md-6'p>>",
"sAjaxSource": "view/cursuri/server_side.php",
autoWidth : false,
"fnPreDrawCallback": function () {
// Initialize the responsive datatables helper once.
if (!responsiveHelper) {
responsiveHelper = new ResponsiveDatatablesHelper(oTable, breakpointDefinition);
}
},
"fnDrawCallback" : function (oSettings) {
responsiveHelper.respond();
},
"fnRowCallback": function( nRow, aData ) {
responsiveHelper.createExpandIcon(nRow);
},
"aoColumns": [
//{ "sClass": "center", "bSortable": false, sWidth: '2%', "bVisible": false },
{ sWidth: '35%' },
{ sWidth: '25%' },
{ sWidth: '20%' },
{ sWidth: '10%' },
{ "sClass": "center", sWidth: '10%', "bSortable": false }
],
"aaSorting": [[2, 'asc']]
} );
!a.sLoadingRecords && (c && 'Loading...' === b.sLoadingRecords) && D(a, a, 'sZeroRecords', 'sLoadingRecords');