$.post("/jzfw/apply/count", function(_data) {
//正常加载信息
if (_data.errorCode == 200) {
datasum = _data.data;
layui.use('laypage', function() {
var laypage = layui.laypage;
//执行一个laypage实例
laypage.render({
elem : 'test1' //注意,这里的 test1 是 ID,不用加 # 号
,limit : 5 //每页数据量
,count : datasum //数据总数,从服务端得到
// ,groups : 3
,jump : function(obj, first) {
//obj包含了当前分页的所有参数,比如:
// alert(obj.curr);
// alert(obj.limit);
applylist(obj.curr,obj.limit);
//首次不执行
if (!first) {
//do something
}
}
});
});
}
});
function applylist(pageIndex,pageSize) {
$
.ajax({
type : 'POST',
url : 'http://localhost:8082/jzfw/apply/list',
async : true,
contentT
layui分页插件的使用及代码实现
最新推荐文章于 2023-09-18 10:21:02 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)