jquery - jQuery DataTable 显示条目不起作用
问题描述
当我使用 DataTables 插件时,显示条目似乎不起作用;它只显示“显示条目”但没有下拉菜单。
<!-- datatable-->
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.25/css/jquery.dataTables.min.css">
<script type="text/javascript" charset="utf8" src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js"></script>
<script>
$(document).ready( function () {
$('#statisticforteacher').DataTable({
"paging": true,
"ordering": true,
"info": true,
"pagingType": "full_numbers",
"bLengthChange": true,
"iDisplayLength" : 10,
//"scrollY": "200px",
//"scrollCollapse": true,
// "paging": false
select: true
});
});
</script>
如您所见,它显示的条目没有下拉菜单,而且搜索框很大。我在哪里可以修复它并使其适合?
刀
<table id="statisticforteacher" class="table-responsive" style="width:100%">
<thead>
<th>Id</th>
<th>FrageBezeichnung</th>
<th>Kapitel</th>
<th>richtige Antwort</th>
<th>falsche Antwort</th>
<th>Richtige Rate</th>
</thead>
<tbody>
@foreach($data as $value)
<tr>
<td>{{$value -> Id}}</td>
<td>{{$value -> FrageBezeichnung}}</td>
<td>{{$value -> Kapitel}}</td>
<td>{{$value -> richtigeAntwort}}</td>
<td>{{$value -> falscheAntwort}}</td>
<td>{{$value -> richtigeRate}}</td>
</tr>
@endforeach
</tbody>
</table>
解决方案
推荐阅读
- python - 同一标签 fig.text 中的多个 fontsize 和 fontweight
- postgresql - How to find input_function for a postgres type
- python - 使用均值和标准差对 R 中的图像进行归一化
- sql-server - 子选择查询
- json - 尝试通过 Vue Axios 加载 json
- java - 如何从对象路径中获取值
- angular - Angular Service does not Retrieve Array Objects through RxJS of
- java - is there a reason why my merge sort does not work for array length 10
- java - CriteriaBuilder - Join table to itself with complex ON
- arrays - Convert Json array into csv using Nifi