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

📄 ss.jsp

📁 这是我平时做练习的翻页源码
💻 JSP
字号:
<%@ page language="java" contentType="text/html;charset=GBK"%>
<%@page import="com.dj.form.PageForm"%>
<%@page import="java.util.List"%>
<%@page import="com.dj.vo.Student"%>
<%
	List list=(List)request.getAttribute("list");
	PageForm pf=(PageForm)request.getAttribute("PageForm");
%>
<html>
  <head>  
    <title>test page</title>  
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
     <%-- 分页跳转用begin --%>
    <script language="javascript" src="js/pagination.js"></script>
     <%-- end --%>
  </head>
  
  <body>
  <form name="form1" method="post" action="" >
  <%-- 分页跳转用begin --%>
  <input type="hidden" name="submitaction" value="Login.do">
	<jsp:include page="hiddenForm.jsp" flush="true"/>
	 <%-- end --%>
	<table border="0" cellpadding="0" cellspacing="0" width="760" align="center">
		<tr>
    		<td width="50%" class="bigbold" height="30" >&nbsp;</td>
  		</tr>
  		<tr>
    		<td width="100%" height="10" colspan="2"></td>
  		</tr>      	
		<tr>
			<td width="100%" colspan="2">
				<table border="0" cellpadding="0" cellspacing="0" width="760" id =buttomm align="center" >
					<tr>
						<td width="100%">
							<table border="1" id="list_hashead" cellpadding="0" cellspacing="0" bordercolor="#9BB3D3" width="100%">
								<tr>									
									<td width="40"  height="28" class="title" >序号</td>
									<td width="200" height="28" class="title" align="center">姓名</td>
									<td width="300" class="title" align="center"  >密码</td>
									<td  height="28" align="center"  class="title">haha
									</td>
								</tr>			  
							 <%
								for(int i = 0; i < list.size(); i++){
							 %>
							  <tr>
								<td  width="5%" height="25" align="center"><%=(pf.getPage_no()-1)*pf.getPAGE_SIZE() + 1 + i%></td>				
								<td  width="20%" align="center"><%=((Student)list.get(i)).getSName()%></td>
								<td  width="35%" align="center"><%=((Student)list.get(i)).getScore()%></td>
								<td  width="40%" align="center"><%=i%></td>
							  </tr>
							  <%}%>							  
							</table>			
						</td>
  		  			</tr>
				</table>
			</td>
  		</tr>
  		 <%-- 分页跳转用begin --%>
		<jsp:include page="pageEnd.jsp" flush="true"/>
		<%-- end--%>
	</table>
</form>
  </body>
</html>

⌨️ 快捷键说明

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