bootstrap分页
来源:互联网 发布:oracle 删除重复数据 编辑:程序博客网 时间:2024/06/05 17:39
js页面:
$(function(){
var pageitem = 20;
var isfirstload = true;
function initPagination(count){
var num_entries = 0;
if(null == count){
num_entries = $("#count").val();
if(null == num_entries){
num_entries = 0;
}else{
totalcount = num_entries;
}
}else{
num_entries = count;
}
if(num_entries==0){
return;
}
var currentpage = $("#currentpage").val();
if(null==currentpage||""==currentpage){
currentpage=0;//当显示第一页时
}
$("#Pagination").pagination(num_entries,{
num_edge_entries:3,//边缘显示页数
num_display_entries:8,//主体显示页数
current_page:currentpage,
callback:pageselectCallback,
items_per_page:pageitem,//每页显示条数
prev_text:"上一页",
next_text:"下一页"
});
};
function pageselectCallback(page_index,jq){
if(isfirstload){
isfirstload = false;
return;
}
window.location.href="myorders?currentpage="+page_index+"&count="+totalcount+"&pageitem="+pageitem;
}
initPagination();
})
html页面加上:
<div class="t_center" style="text-align:center">
<div id="Pagination" class="pagination" ></div>
</div>
后台:
需要传给后台当前页,每页显示数,总数量,第一次查询时设置好,并且返回
- bootstrap分页
- bootstrap分页
- Bootstrap 分页
- bootstrap分页
- Bootstrap 分页
- bootstrap-分页
- bootstrap 分页
- bootstrap分页
- BootStrap 分页
- bootstrap分页
- Bootstrap分页
- bootstrap 分页
- Bootstrap分页插件--Bootstrap Paginator
- Bootstrap分页插件--Bootstrap Paginator
- bootstrap分页插件Bootstrap Paginator
- Bootstrap分页插件--Bootstrap Paginator
- bootstrap table 分页,客户端分页
- bootstrap分页样式
- 索引、分片和矩阵
- 为什么我们要使用ssh框架技术,及感想
- 统一D3D与OpenGL坐标系统
- 日经春秋 20160310
- c++上机3-1
- bootstrap分页
- 第二周项目二简短题目
- 第一次上机试验—2
- C++上机报告(一)
- Ubuntu 命令大全
- 深度学习入门必看的书和论文?有哪些必备的技能需学习?
- OpenGL的工作流程
- 什么时候App委托会收到App进程被结束的消息
- Swift学习 字符串的操作