分页工具条

<c:if
      test="${( not empty pagebean ) and ( pagebean.maxPage gt 1 )}">
      <tr class="table_bg_bottom">
       <th height="29" colspan="12" class="xd_pagg zd_xd_ser table_b_bg">
        <!-- 分页工具条start -->
        <div id="side_right">
         <div class="page_box_c">
          <c:if test="${pagebean.pageNum eq 1}">
           <span>首页</span>
          </c:if>
          <c:if test="${pagebean.pageNum gt 1}">
           <a href="HjServlet.do?act=retriveall&pageNum=1&rowsPerPageNum=${pagebean.rowsPerPage }&chanpin=${cpp}">首页</a>
          </c:if>
          
          <c:if test="${pagebean.lastPage eq 0}">
           <span>上一页</span>
          </c:if>
          <c:if test="${pagebean.lastPage gt 0}">
           <a
            href="HjServlet.do?act=retriveall&pageNum=${pagebean.lastPage }&rowsPerPageNum=${pagebean.rowsPerPage }&chanpin=${cpp}">上一页</a>
          </c:if>
          
          <c:forEach var="n" begin="1" end="${pagebean.maxPage}"
           step="1">
           <a
            href="HjServlet.do?act=retriveall&pageNum=${n}&rowsPerPageNum=${pagebean.rowsPerPage}&chanpin=${cpp}">${n}</a>
          </c:forEach>
          
          <c:if test="${pagebean.nextPage eq 0}">
           <span>下一页</span>
          </c:if>
          <c:if test="${pagebean.nextPage gt 0}">
           <a
            href="HjServlet.do?act=retriveall&pageNum=${pagebean.nextPage }&rowsPerPageNum=${pagebean.rowsPerPage }&chanpin=${cpp}"
            title="下一页">下一页</a>
          </c:if>
          <c:if test="${pagebean.pageNum eq pagebean.maxPage}">
           <span>末尾页</span>
          </c:if>
          <c:if test="${pagebean.pageNum lt pagebean.maxPage}">
           <a class="nxt"
            href="HjServlet.do?act=retriveall&pageNum=${pagebean.maxPage }&rowsPerPageNum=${pagebean.rowsPerPage }&chanpin=${cpp}">末页</a>
          </c:if>
          <span class="page_l_z">第<em>${pagebean.pageNum}</em>页/共<em>${pagebean.maxPage
            }</em>页</span>
          <span
           style="border: #e5e5e5 1px solid; display: inline; padding: 3px 10px; float: left; margin-left: 4px; overflow: hidden; color: #333; text-decoration: none; background: #fff; color: #333">跳转到第<input
            type="text" name="yeshu" id="yeshu" maxlength="3"
            style="width: 20px; height: 10px;" />页</span>
          <a class="nxt" href="javascript:xuanZeYe();">跳转</a>
         </div>
        </div>
       </th>
      </tr>
     </c:if>
    </table>
   </div>
  </div>
  <script type="text/javascript">
  function xuanZe(){
   var tiaoshu=document.getElementById("tiaoshu").value;
   location.href="HjServlet.do?act=retriveall&pageNum=${pagebean.pageNum }&chanpin=${cpp}&rowsPerPageNum="+tiaoshu;
  }
  
  function xuanZeYe(){
   var yeshu=document.getElementById("yeshu").value;
   location.href="HjServlet.do?act=retriveall&rowsPerPageNum=${pagebean.rowsPerPage}&chanpin=${cpp}&pageNum="+yeshu;
  }
  </script>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值