ssm整合分页
前端html部分
<!-- 分页组件 -->
<div class="pagelist">
<c:if test="${!pageInfo.isFirstPage}">
<a href="${pageContext.request.contextPath }/getUserList.action?currentPage=1&limit=${pageInfo.pageSize}">首页</a>
</c:if>
<c:if test="${pageInfo.isFirstPage}">
<a href="javascript:void(0)">首页</a>
</c:if>
<c:if test="${pageInfo.hasPreviousPage}">
<a href="${pageContext.request.contextPath }/getUserList.action?currentPage=${pageInfo.pageNum - 1}&limit=${pageInfo.pageSize}">上一页</a>
</c:if>
<c:if test="${ !pageInfo.hasPreviousPage}">
<a href="javascript:void(0)">上一页</a>
</c:if>
<span class="current"style="background:red;">${
pageInfo.pageNum}</span>
<th>/</th>
<span class="current">${
pageInfo.pages}</span>
<c:if test="${pageInfo.hasNextPage}">
<a href="${pageContext.request.contextPath }/getUserList.action?currentPage=${pageInfo.pageNum + 1}&limit=${pageInfo.pageSize}">下一页</a>
</c:if>
<c:if test="${!pageInfo.hasNextPage}">
<a href="javascript:void(0)">下一页</a>
</c:if>
<c:if test="${!pageInfo.isLastPage}">
<a href="${pageContext.request.contextPath }/getUserList.action?currentPage=${pageInfo.pages}&limit=${pageInfo.pageSize}">尾页</a>
</c:if>
<c:if test="${pageInfo.isLastPage}">
<a href="javascript:void(0)">尾页</a>
</c:if>
</div>
</div>
</form>
后续更新。。。。
还没有评论,来说两句吧...