📄 splitpage.jsp
字号:
<%@ page contentType="text/html;charset=utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
共
<c:out value="${splitPage.totalPage}" />
页
<c:out value="${splitPage.totalRecords}" />
条记录 当前页:
<c:out value="${splitPage.currentPage}" />
<c:if test="${splitPage.currentPage>1}">
<A href="javascript:gotoCurrentPage('1')">首页</A>
</c:if>
<c:if test="${splitPage.currentPage<=1}">
首页
</c:if>
<c:if test="${splitPage.currentPage>1}">
<A
href="javascript:gotoCurrentPage('<c:out value="${splitPage.currentPage-1}"/>')">上一页</A>
</c:if>
<c:if test="${splitPage.currentPage<=1}">
上一页
</c:if>
第
<select class="conditionSelectBox" name='pageNo'
onChange='javascript:gotoCurrentPage(this.value)'>
<c:choose>
<c:when test="${splitPage.totalPage >1}">
<c:forEach var="i" begin="1" end="${splitPage.totalPage}">
<c:if test="${splitPage.currentPage==i}">
<option value='<c:out value="${i}"></c:out>' selected="selected"><c:out
value="${i}"></c:out></option>
</c:if>
<c:if test="${splitPage.currentPage!=i}">
<option value='<c:out value="${i}"></c:out>'><c:out value="${i}"></c:out></option>
</c:if>
</c:forEach>
</c:when>
<c:otherwise>
<option value="1">1</option>
</c:otherwise>
</c:choose>
</select>
页
<c:if test="${splitPage.currentPage<splitPage.totalPage}">
<A
href="javascript:gotoCurrentPage('<c:out value="${splitPage.currentPage+1}"/>')">下一页</A>
</c:if>
<c:if test="${splitPage.currentPage>=splitPage.totalPage}">
下一页
</c:if>
<c:if test="${splitPage.currentPage<splitPage.totalPage}">
<A
href="javascript:gotoCurrentPage('<c:out value="${splitPage.totalPage}"/>')">尾页</A>
</c:if>
<c:if test="${splitPage.currentPage>=splitPage.totalPage}">
尾页
</c:if>
<input type="hidden" name="pageInfo"
value="<c:out value="${splitPage.currentPage}"/>">
<script language="javascript" charset="GBK">
function gotoCurrentPage(pageNo) {
if (null != document.all("badSmell")) {
setToolBarTextValue(pageNo, "currentPage");
getToolBarHiddenObj("refreshListPageHidden").click();
return false;
}
if (null == gotoCurrentPageURL) {
gotoCurrentPageURL = getGotoCurrentPageURL();
}
gotoCurrentPageURL += pageNo;
window.navigate(gotoCurrentPageURL);
return false;
}
</script>
<%
String message = (String) request.getAttribute("message");
if (null != message) {
%>
<script language="javascript" charset="GBK">
alert("<%=message%>");
</script>
<%
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -