pager-taglib记录

jsp文件:
<%@ taglib prefix="pg"  uri="http://jsptags.com/tags/navigation/pager" %>
...........
...........
...........
<pg:pager url="xxx.do" items="${pm.total }" export="currentPageNumber=pageNumber">
	<pg:param name="parentId"/>
	<pg:first>
		<a href="${pageUrl}">首页</a>
	</pg:first>
	<pg:prev>
		<a href="${pageUrl }">前页</a>
	</pg:prev>
	<pg:pages>
		<c:choose>
			<c:when test="${currentPageNumber eq pageNumber }">
			<font color="red">${pageNumber }</font>
			</c:when>
			<c:otherwise>
				<a href="${pageUrl }">${pageNumber }</a>
			</c:otherwise>
		</c:choose>
	</pg:pages>
	<pg:next>
		<a href="${pageUrl }">后页</a>
	</pg:next>
	<pg:last>
		<a href="${pageUrl }">尾页</a>
	</pg:last>
</pg:pager>


页面调用offset值使用request.getParameter("pager.offset");

你可能感兴趣的:(jsp)