<%if(p<pc){%>
<a href="show.jsp?page=<%=p+1%>&txtnaa=<%=txtnaa%>&booktype=<%=booktype%>&type=<%=type%>&mode=<%=mode%>&jcount=<%=jcount%>&ordertype=<%=ordertype%>">下一页</a>
<%}if(p>1){%>
<a href="show.jsp?page=<%=p-1%>&txtnaa=<%=txtnaa%>&booktype=<%=booktype%>&type=<%=type%>&mode=<%=mode%>&jcount=<%=jcount%>&ordertype=<%=ordertype%>">上一页</a>

解决方案 »

  1.   

    分页的链接需要些那么多参数么?“上一页”,“下一页”,“首页”,“尾页”等链接只需要传递一个要显示的页码,放到表单中即可,其他参数的值也放这个表单中,点击链接,提交表单即可。到达服务器端后,在服务器端使用SQL语句自带的分页实现。SqlServer:select top 页大小 * from tb where 条件... and tid not in(
                    select top (页码-1)*页大小 tid from tb where 条件...)oracle:select t.* from (select t.*,t.rownum r from tb t) where r between m and nmysql:select t.* from tb limit m,n
      

  2.   

    更正一下,
    oralce:select tb2.* from (select t.*,rownum r from tb t) tb2 where r between 3 and 5mysql:select t.* from tb t limit m,n
      

  3.   

    你在后台把page读出来,然后根据page取出记录,再传回jsp就可以了,等于就是跳转到这个jsp,你后台怎么写的?
      

  4.   

    select * from tb1 where rownum between (page-1)*10+1 and page*10;
      

  5.   

    第一次来 csdn求助  原来有这么多的好心人   以后就常驻了    不去知道混了