Jquery 如何在laravel中使用datatables插件
如何在adminlte中使用datatables插件?我在默认页面datatables adminlte上尝试了匹配,但它不起作用。 这是我的密码Jquery 如何在laravel中使用datatables插件,jquery,laravel,datatables,adminlte,Jquery,Laravel,Datatables,Adminlte,如何在adminlte中使用datatables插件?我在默认页面datatables adminlte上尝试了匹配,但它不起作用。 这是我的密码 <table id="example2" class="table table-bordered table-hover"> <thead> <tr> <th>Rende
<table id="example2" class="table table-bordered table-hover">
<thead>
<tr>
<th>Rendering engine</th>
<th>Browser</th>
</tr>
</thead>
<tbody>
<tr>
<td>Trident</td>
<td>InternetExplorer 4.0</td>
</tr>
</tbody>
</table>
渲染引擎
浏览器
三叉戟
InternetExplorer 4.0
还有刺耳的声音
<!-- DataTables -->
<script src="{{ URL::asset('assets/plugins/datatables/jquery.dataTables.min.js') }}"></script>
<script src="{{ URL::asset('assets/plugins/datatables/dataTables.bootstrap.min.js') }}"></script>
<link rel="stylesheet" href="{{ URL::asset('assets/plugins/datatables/dataTables.bootstrap.css') }}">
请帮助我,我不知道为什么datatables不工作,在控制台中没有错误。顺便说一句,我使用laravel 5.3和AdminLTE-2.3.0
pagescrypt
<script>
$(function () {
$("#example1").DataTable();
$('#example2').DataTable({
"paging": true,
"lengthChange": false,
"searching": false,
"ordering": true,
"info": true,
"autoWidth": false
});
});
</script>
$(函数(){
$(“#示例1”).DataTable();
$('#示例2')。数据表({
“分页”:正确,
“长度变化”:错误,
“搜索”:错误,
“排序”:正确,
“信息”:正确,
“自动宽度”:false
});
});
首先,您需要删除车身标签
这应该是这样的:
$('#example2').DataTable({
"paging": true,
"lengthChange": false,
"searching": false,
"ordering": true,
"info": true,
"autoWidth": false,
columns:[{'data':'data','name':'name'}]});
我建议看一看这本图册: