You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
2.7 KiB
54 lines
2.7 KiB
2 years ago
|
<%@page contentType="text/html;charset=UTF-8"%>
|
||
|
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||
|
<input type="hidden" id="currentpage" name="currentPage" value="${page.currentPage}"/>
|
||
|
<input type="hidden" id="lastpage" name="lastpage" value="${page.totalPage}"/>
|
||
|
当前显示${page.totalCount==0?0:(page.currentPage-1)==0?1:((page.currentPage-1)*page.pageSize+1)}到${page.totalCount==0?0:(page.currentPage==page.totalPage?(page.totalCount%page.pageSize==0?page.currentPage*page.pageSize:((page.currentPage-1)*page.pageSize+(page.totalCount%page.pageSize))):page.currentPage*page.pageSize)}条数据
|
||
|
第${page.currentPage}页/共${page.totalPage==0?1:page.totalPage}页 共${page.totalCount}条记录 每页${page.pageSize}条记录
|
||
|
<c:choose>
|
||
|
<c:when test="${page.currentPage>1 and page.totalCount!=0}"><a href="javascript:gotoPre()">上一页</a></c:when>
|
||
|
<c:otherwise><a href="javascript:void(0);">上一页</a></c:otherwise></c:choose>
|
||
|
<c:choose>
|
||
|
<c:when test="${page.currentPage<page.totalPage and page.totalCount!=0}"><a href="javascript:gotoNext()">下一页</a> </c:when>
|
||
|
<c:otherwise><a href="javascript:void(0)">下一页</a> </c:otherwise>
|
||
|
</c:choose>
|
||
|
<c:choose>
|
||
|
<c:when test="${page.currentPage!=1 and page.totalCount!=0}"><a href="javascript:gotoFirst()">首页</a></c:when>
|
||
|
<c:otherwise><a href="javascript:void(0)">首页</a></c:otherwise>
|
||
|
</c:choose>
|
||
|
<c:choose>
|
||
|
<c:when test="${page.currentPage!=page.totalPage and page.totalCount!=0}"><a href="javascript:gotoLast()">尾页</a></c:when>
|
||
|
<c:otherwise><a href="javascript:void(0)">尾页</a></c:otherwise>
|
||
|
</c:choose>
|
||
|
|
||
|
跳转到<input type="text" style="width:25px;" id="jumpage" name="jumpage" onKeyUp="value=value.replace(/\D/g,'')" onchange="jumpPage(this.value)"/>页
|
||
|
<script type="text/javascript">
|
||
|
function gotoPre(){
|
||
|
var cp = document.getElementById("currentpage").value;
|
||
|
cp--;
|
||
|
document.getElementById("currentpage").value = cp;
|
||
|
document.listForm.submit();
|
||
|
}
|
||
|
function gotoNext(){
|
||
|
var cp = document.getElementById("currentpage").value;
|
||
|
cp++;
|
||
|
document.getElementById("currentpage").value = cp;
|
||
|
document.listForm.submit();
|
||
|
}
|
||
|
function gotoFirst(){
|
||
|
document.getElementById("currentpage").value = 1;
|
||
|
document.listForm.submit();
|
||
|
}
|
||
|
function gotoLast(){
|
||
|
document.getElementById("currentpage").value = document.getElementById("lastpage").value;
|
||
|
document.listForm.submit();
|
||
|
}
|
||
|
function jumpPage(val) {
|
||
|
var total = document.getElementById("lastpage").value;
|
||
|
if (val <= 0 || val > total){
|
||
|
val = 1;
|
||
|
}
|
||
|
document.getElementById("jumpage").value = val;
|
||
|
document.getElementById("currentpage").value = val;
|
||
|
document.listForm.submit();
|
||
|
}
|
||
|
</script>
|