⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pagelist.jsp

📁 分页 一个javabean 分页
💻 JSP
字号:
<%@ page contentType="text/html; charset=GBK" language="java" import="java.util.*" errorPage="" %>
<%@ include file="/common/taglibs.jsp" %>
<table colspan="10"  valign="bottom"  align="right">
  <tr>
    <td valign="bottom">每页<c:out value="${pageBean.rowsPerPage}"/>行</td>
    <td valign="bottom">共<c:out value="${pageBean.totalPages}"/>页</td>
    <td valign="bottom">第<c:out value="${pageBean.currPage}"/>页</td>
    <td valign="bottom"><a style="cursor:hand" target="_self"  onClick="gotopage('1')">首页</a></td>	
	<c:if test="${pageBean.currPage>1}">
    <td valign="bottom"><a style="cursor:hand" target="_self"  onClick="gotopage('<c:out value="${pageBean.currPage-1}"/>')">上一页</a></td>
	</c:if>
	<c:if test="${pageBean.currPage<pageBean.totalPages}">
    <td valign="bottom"><a style="cursor:hand" target="_self"  onClick="gotopage('<c:out value="${pageBean.currPage+1}"/>')">下一页</a></td>
	</c:if>
    <td valign="bottom"><a style="cursor:hand" target="_self"  onClick="gotopage('<c:out value="${pageBean.totalPages}"/>')">尾页</a></td>
    <td valign="bottom">转到第<select name="gopage"	onChange="gotopage(0)">
	 <c:forEach var="i"   begin="1" end="${pageBean.totalPages}">
	 	<c:choose>
			<c:when test="${i==pageBean.currPage}">
			<option value="<c:out  value="${i}"/>" selected><c:out  value="${i}"/></option>
			</c:when>
			<c:otherwise>
			<option value="<c:out  value="${i}"/>"><c:out  value="${i}"/></option>
			</c:otherwise>
		</c:choose>
	</c:forEach>
		</select>页</td>
  </tr>
</table>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -