zoukankan      html  css  js  c++  java
  • jstl+bootstrap-2.2.1分页组建 ------- 第一版

    效果图:

    <div id="paging" class="pagination pagination-right" >
    		  			<ul>
    		  				<c:choose>
    		  				<c:when test="${pageBean.currentPage > 1}">
    		  					<li><a href="javascript:changePage(${pageBean.currentPage-1 });"><i class="icon-fast-backward"></i></a></li>
    		  				</c:when>
    		  				</c:choose>
    		  				
    		  				
    		  				<c:choose>
    		  				<c:when test="${pageBean.pageCounts != 1}">
    		  					<c:if test="${pageBean.currentPage==1}">
    		  					<li><a style="background-color: #FFFADA;">1</a></li>
    		  					</c:if>
    		  					<c:if test="${pageBean.pageCounts!=null and pageBean.currentPage!=1}">
    		  					<li><a href="javascript:changePage(1);">1</a></li>
    		  					</c:if>
    		  				</c:when>
    		  				<c:when test="${pageBean.pageCounts == 1}">
    		  					<li><a style="background-color: #FFFADA;");">${pageBean.pageCounts}</a></li>
    		  				</c:when>
    		  				</c:choose>
    		  				
    		  				
    		  				
                        	<c:forEach begin="1" end="${pageBean.pageCounts}" varStatus="i">
                        		<c:choose>
                        		<c:when test="${pageBean.currentPage ==i.index and pageBean.currentPage!=pageBean.pageCounts and pageBean.currentPage!=1}">
                        			<li><a style="background-color: #FFFADA;">${i.index } </a></li>
                        		</c:when>
                        		<c:otherwise>
                        		<!-- 左侧 -->
                        		<c:if test="${pageBean.currentPage > 4 and pageBean.currentPage - i.index<4 and pageBean.currentPage >i.index}">
                        			<li><a href="javascript:changePage(${i.index });">${i.index } </a></li>
                        		</c:if>
                        		<c:if test="${pageBean.currentPage < 5 and pageBean.currentPage - i.index<3 and pageBean.currentPage > i.index and  i.index > 1}">
                        			<li><a href="javascript:changePage(${i.index });">${i.index } </a></li>
                        		</c:if>
                        		<!-- 右侧 -->
                        		<c:if test="${pageBean.pageCounts-pageBean.currentPage>4 and i.index - pageBean.currentPage <4 and i.index> pageBean.currentPage }">
                        			<li><a href="javascript:changePage(${i.index });">${i.index } </a></li>
                        		</c:if>
                        		<c:if test="${pageBean.pageCounts-pageBean.currentPage<5 and i.index - pageBean.currentPage <3 and i.index> pageBean.currentPage and i.index<pageBean.pageCounts }">
                        			<li><a href="javascript:changePage(${i.index });">${i.index } </a></li>
                        		</c:if>
                        		</c:otherwise>
                        		</c:choose>
                        	</c:forEach>
                        	
                        	<c:choose>
                        	<c:when test="${pageBean.pageCounts != 1}">
    		  					<c:if test="${pageBean.pageCounts!=null and pageBean.currentPage==pageBean.pageCounts}">
    		  					<li><a style="background-color: #FFFADA;">${pageBean.pageCounts}</a></li>
    		  					</c:if>
    		  					<c:if test="${pageBean.pageCounts != 0 and pageBean.currentPage!=pageBean.pageCounts}">
    		  					<li><a href="javascript:changePage(${pageBean.pageCounts});">${pageBean.pageCounts}</a></li>
    		  					</c:if>
    		  				</c:when>
    		  				</c:choose>
    		  				
                        	
                        	<c:if test="${pageBean.pageCounts != 0 and pageBean.currentPage != pageBean.pageCounts}">
                        		<li><a href="javascript:changePage(${pageBean.currentPage+1 });"><i class="icon-fast-forward" ></i></a></li>
                        	</c:if>
    					</ul>
    				</div>
    
  • 相关阅读:
    cinder支持nfs快照
    浏览器输入URL到返回页面的全过程
    按需制作最小的本地yum源
    创建可执行bin安装文件
    RPCVersionCapError: Requested message version, 4.17 is incompatible. It needs to be equal in major version and less than or equal in minor version as the specified version cap 4.11.
    惠普IPMI登陆不上
    Linux进程状态——top,ps中看到进程状态D,S,Z的含义
    openstack-neutron基本的网络类型以及分析
    openstack octavia的实现与分析(二)原理,架构与基本流程
    flask上下文流程图
  • 原文地址:https://www.cnblogs.com/xuzhenmin/p/3544014.html
Copyright © 2011-2022 走看看