String Page=request.getParameter("page");
if (Page!=null)
{
ShowPage=Integer.parseInt(Page);
if (ShowPage>PageCount)
ShowPage=PageCount;
else if(ShowPage<0)
ShowPage=1;
}else
ShowPage=1;if (RecordCount>0)
{
rs.absolute((ShowPage-1)*PageSize+1);
for (int i=1;i<PageSize;i++)
{
Notice_Id=rs.getString("公告id");麻烦会的朋友指点下~谢谢了
if (Page!=null)
{
ShowPage=Integer.parseInt(Page);
if (ShowPage>PageCount)
ShowPage=PageCount;
else if(ShowPage<0)
ShowPage=1;
}else
ShowPage=1;if (RecordCount>0)
{
rs.absolute((ShowPage-1)*PageSize+1);
for (int i=1;i<PageSize;i++)
{
Notice_Id=rs.getString("公告id");麻烦会的朋友指点下~谢谢了
第一行,先获取需要打开的页码,然后对页码的合法性进行判断,然后在resultset里面定位记录的位置(rs.absolute....)