📄 jsp_fenyejishu.txt
字号:
<%
int dispage = 1;
int countRecord = 0;//记u24405 条u25968
int countPageRecord = 2;//每u-26507 记u24405 条u25968
int countPage = 0;//总u-26507 数
String pages = request.getParameter("dispage");
if (pages == null) {
pages = "1";
}
try {
dispage = Integer.parseInt(pages);
} catch (Exception e) {
dispage = 1;
}
PreparedStatement pstmt = conn
.prepareStatement("select * from pj order by Id desc");
ResultSet rs = null;
rs = pstmt.executeQuery();
rs.last();
countRecord = rs.getRow();
//得u21040 总u-26507 数
if (countRecord / countPageRecord == 0)
countPage = countRecord / countPageRecord;
else
countPage = countRecord / countPageRecord + 1;
//把u-29776 录u25351 针u31227 至u24403 前u-26507 第u19968 条u-29776 录u20043 前
if ((dispage - 1) * countPageRecord == 0)
rs.beforeFirst();
else
rs.absolute((dispage - 1) * countPageRecord);
%>
<TABLE height="576" cellSpacing=0 cellPadding=0
width="786" >
<TBODY>
<tr>
<td align=center valign=top>
<p> </p>
<Table style='font-size: 10pt;' width="247" height="82" border=0>
<tr align=top>
<td valign=top >
<%
int i = 0;
while (rs.next()) {
out.println("<font size=3 ><a href='./huanuo.jsp?Table=pj&fID="
+ rs.getInt("Id")
+ "'>◆
+ codeToString(rs.getString("topic"))+"<br>");
//+ " ("+ codeToString(rs.getString("fDate")) + ")<br>");
i++;
if (i >= countPageRecord)
break;
}
%>
</td>
</tr>
<tr>
<td align=center>
<%
try {
out.print("共 + countRecord + "条u-29776 录共 + countPage + "页当u21069 第
+ dispage + "页每u-26507 " + countPageRecord + "条u-29776 录u-244 ");
if (dispage != 1) {
out.println("<a href=huanuo.jsp?dispage=1>首u-26507 </a>");
out.print("<a href=huanuo.jsp?dispage=" + (dispage - 1)
+ " > 上u19968 页/a>");
}
if (dispage != countPage) {
out.print("<a href=huanuo.jsp?dispage=" + (dispage + 1)
+ ">下u19968 页/a>,");
out.print("<a href=huanuo.jsp?dispage=" + countPage
+ ">末u-26507 </a>,");
}
conn.close();
} catch (SQLException e1) {
out.print("SQL异u24120 !);
}
%>
</td>
</tr>
</Table>
</td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -