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

📄 page.jsp

📁 主要是描述的同学录系统
💻 JSP
字号:
<%@ page import="java.util.*,com.page.*"%>
<%@ page contentType="text/html;charset=gbk"%>
<jsp:useBean id="PageCount" scope="page" class="com.page.PageCt" />


<html>
	<head>
		<TITLE>测试</TITLE>
		<STYLE>
body,table{font-size:9pt}
A:link {
COLOR: #000084; TEXT-DECORATION: none
}
A:visited {
COLOR: #000084; TEXT-DECORATION: none
}
A:hover {
COLOR: black; TEXT-DECORATION: underline
}
.ourfont {
FONT-SIZE: 9pt
}
</STYLE>
	</head>
	<body bgcolor=#eff3ff>
		<center>
			<font color=#000084><h3>
					所有信息分页bean测试
				</h3>
			</font>
			<hr width=600 color=#b5dbff>
			<br>
			<table border=0 width=600>

				<%
					Func f = new Func();
					long data_num = f.countAll();
					long Current_Page = 0;
					String currentpage = (String) request.getParameter("currentpage");
					if (currentpage != null && !currentpage.equals("")) {
						Current_Page = Integer.parseInt(request
						.getParameter("currentpage"));
					}
					String Query_Page = (String) request.getParameter("Query_Page");
					if (Query_Page != null && !Query_Page.equals("")) {
						Current_Page = Integer.parseInt(request
						.getParameter("Query_Page")) - 1;
					}

					PageCount.Init(Current_Page, data_num);
					long l_start = PageCount.getStart();
					long l_end = PageCount.getEnd();

					//查询记录
					List list = f.selectAll();
					for (Long i = l_start; i < l_end; i++) {
						Vo vo = (Vo) list.get(new Integer(i.toString()));
				%>
				<tr>
					<td>
						id:
						<%=vo.getId()%>
					</td>
					<td>
						name:
						<%=vo.getName()%>
					</td>
				</tr>
				<%
				}
				%>
			</table>
			<table width=600>
				<tr bgcolor=#b5dbff>
					<form method=GET action=page.jsp>
					<td width=80 align=center valign=bottom>
						<%=PageCount.getTotalnum()%>
					</td>
					<td width=80 align=center valign=bottom>
						<%=PageCount.getCurpage() + 1%>
						/
						<%=PageCount.getTotalpage()%>
					</td>
					<td width=120 align=center>
						查看第
						<input type=text name=Query_Page size=3>
					</td>
					<td width=50 align=center valign=bottom>
						<a href="page.jsp?currentpage=<%=PageCount.getPrepage()%>">上页</a>
					</td>
					<td width=50 align=center valign=bottom>
						<a href="page.jsp?currentpage=<%=PageCount.getNextpage()%>">下页</a>
					</td>
			</table>
	</body>
</html>

⌨️ 快捷键说明

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