当点击翻页按钮的时候如何提交表单,除了用session的方式

解决方案 »

  1.   

    点击下一页 submit 不过要带上当前页数 和每页记录数 这2个参数
      

  2.   

    提交表单一样的提交呀!
    你的自定义标签有加form吧?
    然后触发一个事件!
      

  3.   

    最好是贴下你的分页代码,我是没有用form
      

  4.   

    <div class="nextprepage mb15">
    <pages:pages cpage="${cpage}"  total="${total}"allCount="${allCount}" url="hotel_access_list_list.action?" showCount="${showCount}" />
    这个使用的是struts自定义标签做的 
      

  5.   

    http://www.360doc.com/content/09/0707/16/117897_4176357.shtml基本方式跟这个一样  现在一个疑惑就是  当你搜索的时候,然后翻页,表单如何提交
      

  6.   

    搜索的时候把条件加上,一起提交的后台。然后把分页信息的offset和limit,也要提交。
      

  7.   

    貌似你还没懂我的意思  你先百度下struts自定义分页标签 完了再回答
      

  8.   

      我就是问你struts分页标签如何把查询条件提交到后台?
      

  9.   


    String style = "style=\"color: #F60;text-decoration: underline;border: 1px solid #F60;\"";
    // 上一页
    if(cpageInt<=totalInt){
    if(cpageInt>1)
    str.append("<li><a href='"+ this.url+"total="
    + this.total
    + "&cpage=" + (cpageInt - 1) +"&showCount="+this.showCount+ "'>&lt上一页</a></li><ul>");
    }
    if (totalInt <= 5) {// 页数小于5
    for (int i = 1; i <= totalInt; i++) {
    str.append("<li><a "+(cpageInt==i?style:"")+" href='" + this.url
    + "" + "total=" + this.total + "&cpage="
    + i +"&showCount="+this.showCount+"'>" + i + "</a></li>");
    }
    } else {// 页数大于5
    if (cpageInt <= 3) {
    for (int i = 1; i <= 5; i++) {
    str.append("<li><a "+(cpageInt==i?style:"")+" href='" + this.url
    + "" + "total=" + this.total + "&cpage="
    + i +"&showCount="+this.showCount+"'>" + i + "</a></li>");
    }
    }else if(cpageInt>=totalInt-2){
    for (int i = totalInt - 4; i <= totalInt; i++){
    str.append("<li><a "+(cpageInt==i?style:"")+" href='" + this.url
    + "" + "total=" + this.total + "&cpage="
    + i +"&showCount="+this.showCount+"'>" + i + "</a></li>");
    }
    }else{
    for (int i = cpageInt - 2; i <= cpageInt+2; i++){
    str.append("<li><a "+(cpageInt==i?style:"")+" href='" + this.url
    + "" + "total=" + this.total + "&cpage="
    + i +"&showCount="+this.showCount+ "'>" + i + "</a></li>");
    }
    }
    }
    // 下一页
    if(cpageInt<totalInt){
    str.append("<li><a href='"+ this.url+"total="
    + this.total
    + "&cpage=" + (cpageInt + 1) +"&showCount="+this.showCount+ "'>下一页></a></li><ul></div>");
    }
    这个是分页部分源代码
      

  10.   

    触发JS函数就行
    fanye(pageNum,tiaojian){window.location.href=xxx.do?pege=pageNum&tiaojian=tiaojian;
    }
    只要传页面的查询条件,和你想要跳转到的页码就可以了。后台处理完成后,记得要把查询条件传到前台显示出来,以便下次翻页的时候再次传值。
      

  11.   


    你这样不是get传值了吗?如果遇到中文字?