这里是template,我已经复制了bower_components和dist文件夹的内容。我也做了所有的链接,并要求我需要或可以找到的很好。所有工作都不需要404,而只需要状态码200。我的代码如下:
<div class="box">
<div class="box-header">
<h3 class="box-title">Data Table With Full Features</h3>
</div>
<!-- /.box-header -->
<div class="box-body">
<table id="example1" class="table table-bordered table-striped">
<thead>
<tr>
<th>Rendering engine</th>
<th>Browser</th>
<th>Platform(s)</th>
<th>Engine version</th>
<th>CSS grade</th>
</tr>
</thead>
<tbody>
<tr>
<td>Trident</td>
<td>Internet Explorer 4.0
</td>
<td>Win 95+</td>
<td> 4</td>
<td>X</td>
</tr>
<tr>
<td>Trident</td>
<td>Internet Explorer 5.0
</td>
<td>Win 95+</td>
<td>5</td>
<td>C</td>
</tr>
<tr>
<td>Trident</td>
<td>Internet Explorer 5.5
</td>
<td>Win 95+</td>
<td>5.5</td>
<td>A</td>
</tr>
<tr>
<td>Other browsers</td>
<td>All others</td>
<td>-</td>
<td>-</td>
<td>U</td>
</tr>
</tbody>
<tfoot>
<tr>
<th>Rendering engine</th>
<th>Browser</th>
<th>Platform(s)</th>
<th>Engine version</th>
<th>CSS grade</th>
</tr>
</tfoot>
</table>
</div>
<!-- /.box-body -->
</div>
我使表格显示正常,但没有进行搜索,显示X条目,分页或类似的其他内容。似乎我正在复制悬停数据表,但是代码显示它是具有完整功能的数据表。我还在页面1631-1643底部底部附近的页面上包含了小脚本,它是这样的:
$(function () {
$('#example1').DataTable();
$('#example2').DataTable({
'paging' : true,
'lengthChange': false,
'searching' : false,
'ordering' : true,
'info' : true,
'autoWidth' : false
});
});
我尝试过移动文件
不好意思的代码样式,它仍然应该给出正确的想法。
在您的脚本中,将false设置为“搜索”
尝试使用“ true”
$(function () {
$('#example1').DataTable();
$('#example2').DataTable({
'paging' : true,
'lengthChange': false,
'searching' : true, // change this one
'ordering' : true,
'info' : true,
'autoWidth' : false
});
});