page1.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="pg" uri="http://jsptags.com/tags/navigation/pager" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript"
src="<%=request.getContextPath()%>/js/jquery-1.4.2.js"></script>
<script type="text/javascript"
src="<%=request.getContextPath()%>/js/page/page1.js"></script>
</head>
<body>
<table width="100%" border="0" align="center">
<tr align="center">
<td >当页记录数:<b>${page.preTotal }</b>条 |
共<b>${page.allPage }</b>页<b>${page.total}</b>条记录
</td>
<td >
<input type="hidden" id="total" value="${page.total}" style="width:160px;" maxlength="20" />
<a href="#${page.previousPage }" id="previousPage" οnclick="topr(this)">上一页</a> |
第${page.showPage }/${page.allPage }页 |
<a href="#${page.nextPage }" id="nextPage" οnclick="tonx(this)">下一页</a> |
转到第
<select name="showPage" id="select_page">
<s:iterator id="pl" value="#page.list" >
<s:if test="%{pl eq page.showPage}">
<option value="${pl }" selected>
${pl }
</option>
</s:if>
<s:else>
<option value="${pl }">${pl}</option>
</s:else>
</s:iterator>
</select>
页 |
每页<input type="text" id="rows" name="rows" size="1" value="${page.rows }" maxlength="3" />行
<input type="button" class="button" value="Go" id="go_btn" />
</td>
</tr>
</table>
</body>
</html>