page1.jsp
上传用户:huijianzhu
上传日期:2009-11-25
资源大小:9825k
文件大小:2k
- <%@ page contentType="text/html;charset=GB2312" %>
- <!--分页开始-->
- <table border="0" cellspacing="3" cellpadding="0" align="left" width="565">
- <tr align="center">
- <td width="80%"></td>
- <td nowrap class="pageStyle">共<font color="red"><%=allCount%></font>记录</td>
- <td nowrap class="pageStyle">第<font color="red"><%=currentPage%></font>/<%=allPage%>页
- <td nowrap class="pageStyle">
- <% if(currentPage>1){ %>
- <a href="<%=request.getRequestURI()%>?currentpage=1¤tId=<%=currentId%>">首页</a>
- <% }else{ %>首页<%}%>
- </td>
- <td nowrap class="pageStyle">
- <% if(currentPage>1){ %>
- <a href="<%=request.getRequestURI()%>?currentPage=<%=currentPage-1%>¤tId=<%=currentId%>">上一页</a>
- <% }else{ %>上一页<%}%>
- </td>
- <td nowrap class="pageStyle">
- <% if(currentPage<allPage){ %>
- <a href="<%=request.getRequestURI()%>?currentPage=<%=currentPage+1%>¤tId=<%=currentId%>">下一页</a>
- <% }else{ %>下一页<%}%>
- </td>
- <td nowrap class="pageStyle">
- <% if(currentPage<allPage){ %>
- <a href="<%=request.getRequestURI()%>?currentPage=<%=allPage%>¤tId=<%=currentId%>">尾页</a>
- <% }else{ %>尾页<%}%>
- </td>
- <td nowrap class="pageStyle">第
- <select name="select2" onchange="location.href='<%=request.getRequestURI()%>?currentId=<%=currentId%>¤tPage='+this.options[this.selectedIndex].value;">
- <%
- String selectedOption = "";
- for(int i=1;i<=allPage;i++){
- if(i==currentPage){
- selectedOption = "selected";
- }else{
- selectedOption = "";
- }
- %>
- <option value="<%=i%>" <%=selectedOption%>><%=i%></option>
- <%}%>
- </select> 页
- </td>
- </tr>
- </table>
- <!--分页结束-->