javascript - 添加数据表分页
问题描述
我想添加数据表分页:
<div class="table-responsive">
<table class="table table-bordered"id="dataTable" cellspacing="0">
... 继续
解决方案
使用 jQuery,您可以通过添加到表响应中的新类来添加分页,如下所示:
$(document).ready(function () {
$('#dataTable').DataTable(); //your data table id
$('.table-responsive').addClass('bs-select'); //add class
});
推荐阅读
- c# - '对象不能从 DBNull 转换为其他类型。' 在存储过程中
- php - 不能从项目中完全删除 maatwebsite/excel
- laravel - 无法在 laravel 中使用 ajax 保存价值
- python - 如何在 Anaconda 环境中更改 Python 解释器路径?
- java - 有没有办法循环通过以编程方式添加的 SeekBars 数组
- bash - 如何使用 bash 查找出现在文件同一行的 2 个值?
- python - 'max_pooling2d_8/MaxPool' 从 1 中减去 3 导致的负维度大小
- java - 安装 AspectJ Eclipse
- go - 如何在struct中正确构造struct
- javascript - 内置函数中尾调用的优化