分页总结
head.jsp
<!-- 分页 -->
<link rel="stylesheet" href="<%=path %>/static/bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css">
foot.jsp
<!-- 分页 -->
<script src="<%=path %>/static/bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="<%=path %>/static/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
<script>
$(function () {
$('#example1').DataTable({
"pagingType": "simple_numbers",//设置分页控件的模式
searching: false,//屏蔽datatales的查询框
aLengthMenu:[5,10],//设置一页展示10条记录
"oLanguage": { //对表格国际化
"sLengthMenu": "每页显示 _MENU_条",
"sZeroRecords": "没有找到符合条件的数据",
// "sProcessing": "<img src=’./loading.gif’ />",
"sInfo": "当前第 _START_ - _END_ 条 共计 _TOTAL_ 条",
"sInfoEmpty": "木有记录",
"sInfoFiltered": "(从 _MAX_ 条记录中过滤)",
"sSearch": "搜索:",
"oPaginate": {
"sFirst": "首页",
"sPrevious": "前一页",
"sNext": "后一页",
"sLast": "尾页"
}
},
})
})
</script>
Bootstrap分页总结
最新推荐文章于 2021-02-01 15:59:38 发布