谁有完整的jsp分页程序?
各位:
谁有完整的jsp分页程序?
------解决方案--------------------网上多的是,如果找不到你Q我,晚上给你!
------解决方案-------------------- <%@ page contentType= "text/html; charset=gb2312 " language= "java " import= "java.sql.* "
errorPage= " " %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN " "http://www.w3.org/TR/html4/loose.dtd ">
<%@ page import= "java.util.* "%>
<%@ page import= "shenzhou.DAO.* "%>
<%@ page import= "shenzhou.Bean.* "%>
<html>
<title> 新视窗管理 </title>
<style>
td{ font-size:14px;}
</style>
<body>
<table width= "98% " border= "0 " align= "center " cellpadding= "1 " cellspacing= "0 " bgcolor= "E6E6E6 ">
<tr bgcolor= "#CCCCCC ">
<td align= "center "> <strong> 视窗大类管理 </strong> </td>
</tr>
<tr>
<form name= "form1 " method= "post " action= "/ad/shichuang/DaleiView.html?dalei=delete ">
<td height= "200 " valign= "top " bgcolor= "#FFFFFF "> <br>
<table width= "100% " border= "0 " align= "center " cellpadding= "0 " cellspacing= "1 " bgcolor= "E6E6E6 ">
<tr height= "20 " bgcolor= "#FFFFFF ">
<td width= "10% " align= "center "> 大类名称 </td>
<td width= "15% " align= "center "> 版本 </td>
<td WIDTH= "8% " align= "center "> 删除 </td>
<td WIDTH= "6% " align= "center "> 修改 </td>
</tr>
<%
LinkedList talkList=(LinkedList)session.getAttribute( "daleiview ");
int countSize=0; //总记录数
int sumPage=0; //总页数
int sizePage=20; //每页显示页数
int dPage=0; //当前第几页
int start=0;
int end=0;
if(talkList.size()==0)
{
out.println( " <font color= 'red '> 对不起,暂无数据!!! </font> ");
}
else
{
String strPage=request.getParameter( "page ");
if(strPage==null)
{
dPage=1;
}
else
{
dPage=Integer.parseInt(strPage);
if(dPage <1)
{
dPage=1;
}
}
if(talkList!=null)
{
countSize=talkList.size(); //得总记录
}
sumPage=(countSize+sizePage-1)/sizePage; //得总页数
if(dPage==sumPage)
{
dPage=sumPage;
}
start=(dPage-1)*sizePage; //定位记录号
end=sizePage*dPage;
for(int i=start;i <end&&i <countSize;i++)
{
DaleiBean daleibean = new DaleiBean();
daleibean=(DaleiBean)talkList.get(i);
%>
<tr align= "center " bgcolor= "#FFFFFF " height= "20 ">
<td align= "center "> <%=daleibean.getDalei_name()%> </td>
<td align= "center &quo