Jquey easyUI 分页查询

sxl_88 sxl_88 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
目前直接在 HTML 声明datagrid组件,但是需要写查询参数都不方便,后来编写 JavaScript 代码来创建datagrid组件,但是发现分页时直接查询出后台数据库所有数据后再分页,这样效果不好,影响效率。
请问有没有办法实现点击分页按钮后根据页码和记录数实现分页查询?请问如何修改下面的代码,谢谢!

附上 HTML 声明datagrid组件

<table id="dg" title="My Users" class="easyui-datagrid" style="width:700px;height:250px"
url="get_users.php"
toolbar="#toolbar" pagination="true"
rownumbers="true" fitColumns="true" singleSelect="true">
<thead>
<tr>
<th field="firstname" width="50">First Name</th>
<th field="lastname" width="50">Last Name</th>
<th field="phone" width="50">Phone</th>
<th field="email" width="50">Email</th>
</tr>
</thead>
</table>
...全文

相关推荐

评论 10
收藏 已收藏
分享
返回顶部
sxl_88
.NET社区 62,271 成员 668,968 内容