这工作正常:
<table id="dataTable">
<thead>
<tr>
<th>
Title
</th>
<th>
Creator
</th>
<th>
Subjects
</th>
<th></th>
</tr>
</thead>
</table>
<script type="text/javascript">
$(document).ready(function () {
$('#dataTable').dataTable({
"sDom": 'ft<"bottom clear"ip><"clear">',
"bServerSide": true,
"iDisplayLength": 10,
//"bProcessing":true,
"sAjaxSource": '@Url.Action("GetMessages","Performance")',
"aoColumns": [
{ "sName": "Title" },
{ "sName": "Creator" },
{ "sName": "Subject" }]
});
});
</script>
如果我取消注释“bprocessing:true”行,则会出现此异常 Uncaught TypeError: Cannot read property 'length' of undefined jquery.dataTables.min.js:65
抛出异常的代码对我来说意义重大
function E(a, b) {
if (a.oFeatures.bProcessing)
for (var c = **a.aanFeatures.r**, d = 0, i = c.length; d < i; d++)
c[d].style.visibility = b ? "visible" : "hidden";
h(a.oInstance).trigger("processing", [a, b])
}
a.aanFeatures 存在,但 a.aanFeatures.r 未定义。性能控制器中的操作甚至不会被调用。
任何人?