$.ajax({
url: '../../admin/adminInfoList',
type: 'GET',
dataType: 'json',
success: function(result){
console.log(result);
getAdminListTable(result.row);
getAdminListPager(result.totalRows);
}
});
function getAdminListPager(totalCount){
$('#totalCount').text(totalCount);
$('#callBackPager').extendPagination({
totalCount: totalCount,
showCount: 10,
limit: 10,
callback: function (curr, limit, totalCount) {
console.log(curr);
$.ajax({
url: '../../admin/adminInfoList',
type: 'GET',
dataType: 'json',
data: {pageNo: curr},
success: function(result){
console.log(result);
getAdminListTable(result.row);
}
});
}
});
}我这样使用时不时刷新会出现报错啊,求解?
报错为:Uncaught TypeError: $(...).extendPagination is not a function
回复展示选项数 配置项应该叫 showPage 不是 showCount,
所以 index.html里有个问题(加粗的 showPage 为修改位置)
$('#callBackPager').extendPagination({
totalCount: totalCount,
showPage: showCount,
limit: limit,
callback: function(curr, limit, totalCount) {
createTable(curr, limit, totalCount);
}
});
回复
这个用ajax怎么填充数据的
实在不好意思,有一段时间没有登录邮箱了,帐号也没有理清,总算找回了,谢谢大家的关注,bug造成的问题实在抱歉,谢谢大神的解决