【发布时间】:2016-02-12 19:26:19
【问题描述】:
我的表有以下代码class="table table-striped table-bordered bootstrap-datatable datatable datatable" 我想使用数据表功能,如搜索、分页等。因此我在类列表中添加了数据表。
我还提供了指向<script src='js/jquery.dataTables.min.js'></script> 的链接
但我得到这个错误。它缺少哪个类名如何添加?
Uncaught TypeError: Cannot read property 'className' of undefined and it points 到 .js 文件中的这一行。
(n.className+=" "+m.sClass),k?d._anHidden[g]=null:(d._anHidden[g]=n,n.parentNode.removeChild(n)),m.fnCreatedCell&&m.fnCreatedCell.call(a.oInstance,n,w(a,b,g,"display"),d._aData,b,g)}}if(0!==a.aoRowCreatedCallback.length){b=0;for(c=a.aoData.length;b<c;b++)d=a.aoData[b],C(a,"aoRowCreatedCallback",null,[d.nTr,d._aData,b])}}function K(a,b){return b._DT_RowIndex!==n?b._DT_RowIndex:null}function da(a,b,c){for(var b=L(a,b),d=0,a=a.aoColumns.length;d<a;d++)if(b[d]===c)return d;
目前这是我的表结构的样子
<div class="box-content">
<table class="table table-striped table-bordered bootstrap-datatable datatable datatable" style='table-layout: fixed;'>
<thead>
<tr>
<th style='width: 10%;'>No.</th>
<th style='width: 35%;'>Name</th>
<th style='width: 25%;'>Contact Number</th>
<th style='width: 20%;'>Stats</th>
</tr>
</thead>
【问题讨论】:
标签: javascript jquery css twitter-bootstrap datatable