论坛首页 Java企业应用论坛

页面分页

浏览 1165 次
锁定老帖子 主题:页面分页
该帖已经被评为隐藏帖
作者 正文
   发表时间:2008-08-08  
<table>
<tr>
<td>共${pageCountHelp.pageCount}页</td>
<td></td>
<c:if test="${(pageCountHelp.pageNo)>1}">
<td><a href="listemployee.do?pageNo=1">first</a>
<a href="listemployee.do?pageNo=${(pageCountHelp.pageNo)-1}">previous</a></td>
</c:if>
<td><c:choose>
<c:when
test="${(pageCountHelp.pageNo+3<pageCountHelp.pageCount)&&(pageCountHelp.pageNo-3<=0)}">
<c:forEach var="pageNum" begin="1" end="7">
<c:choose>
<c:when test="${pageNum==pageCountHelp.pageNo}">
${pageNum}
</c:when>
<c:otherwise>
<a href="listemployee.do?pageNo=${pageNum}">${pageNum}</a>
</c:otherwise>
</c:choose>
</c:forEach>
</c:when>
<c:when
test="${(pageCountHelp.pageNo+3<pageCountHelp.pageCount)&&(pageCountHelp.pageNo-3>0)}">
<c:forEach var="pageNum" begin="${pageCountHelp.pageNo-3}"
end="${pageCountHelp.pageNo+3}">
<c:choose>
<c:when test="${pageNum==pageCountHelp.pageNo}">
${pageNum}
</c:when>
<c:otherwise>
<a href="listemployee.do?pageNo=${pageNum}">${pageNum}</a>
</c:otherwise>
</c:choose>
</c:forEach>
</c:when>
<c:when
test="${(pageCountHelp.pageNo+3>=pageCountHelp.pageCount)&&(pageCountHelp.pageNo-3>0)}">
<c:forEach var="pageNum" begin="${pageCountHelp.pageNo-3}"
end="${pageCountHelp.pageCount}">
<c:choose>
<c:when test="${pageNum==pageCountHelp.pageNo}">
${pageNum}
</c:when>
<c:otherwise>
<a href="listemployee.do?pageNo=${pageNum}">${pageNum}</a>
</c:otherwise>
</c:choose>
</c:forEach>
</c:when>

<c:when
test="${(pageCountHelp.pageNo+3>=pageCountHelp.pageCount)&&(pageCountHelp.pageNo-3<=0)}">
<c:forEach var="pageNum" begin="1" end="${pageCountHelp.pageCount}">
<c:choose>
<c:when test="${pageNum==pageCountHelp.pageNo}">
${pageNum}
</c:when>
<c:otherwise>
<a href="listemployee.do?pageNo=${pageNum}">${pageNum}</a>
</c:otherwise>
</c:choose>
</c:forEach>
</c:when>
</c:choose></td>
<c:if test="${(pageCountHelp.pageNo)<(pageCountHelp.pageCount)}">
<td><a href="listemployee.do?pageNo=${(pageCountHelp.pageNo)+1}">next</a>
<a href="listemployee.do?pageNo=${pageCountHelp.pageCount}">last</a></td>
</c:if>
</tr>
</table>
论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics