日期:2014-05-19 浏览次数:20657 次
<pg:pager url="login.action" maxPageItems="3" maxIndexPages="20" export="currentPageNumber=pageNumber"> <table align="center" border="1"> <tr> <td>name</td> </tr> <c:forEach var="user" items="${requestScope.users}"> <pg:item> <tr> <td>${user.realname}</td> </tr> </pg:item> </c:forEach> <tr> <td colspan="3"> <pg:index> <center> <table = border=0 cellpadding=0 width=10% cellspacing=0> <tr align="center" valign="top"> <pg:prev ifnull="true"> <%if(pageUrl != null){ %> <td align=right> <a href="<%=pageUrl %>"><img src="" alt="" border=""/><br/><b>前一页</b></a> </td> <%}else{ %> <td><img src="" alt="" border=""/><br/></td> <%} %> </pg:prev> <pg:pages> <%if(pageNumber ==currentPageNumber){%> <td> <img src="" alt=""/><br/> <font color=#A90A08><%=pageNumber %></font> </td> <%}else{ %> <td> <a href="<%=pageUrl %>"><img src="" alt="" border=0/><br/><%=pageNumber %></a> </td> <%}%> </pg:pages> <!-- 中间 --> <pg:next ifnull="true"> <%if(pageUrl != null){ %> <td> <a href="<%=pageUrl %>"><img src="" alt="" border=0/><br/><b>下一页</b></a> </td> <%}else{ %> <td> <img src="" alt="" border=0/> </td>