c:forEach 遍历集合中的元素,判断是否是最后一个元素

来源:互联网 发布:机房网络交换机柜回收 编辑:程序博客网 时间:2024/06/07 22:35
<c:forEach items="${pointSection}" var="chl" varStatus="stat">
        <c:if test="${!stat.last}" >
         <div class="item" id="_MYJD_repair" style="border-bottom-style: dotted;border-bottom-width: 1px;border-bottom-color: olive">
          <a href="pointProductController.html?flag=flagPProductsection${chl.pointseId}" class="zltda">${chl.section}</a>
         </div>
        </c:if>
        
<c:if test="${stat.last}">
         <div class="item" id="_MYJD_repair">
          <a href="pointProductController.html?flag=flagPProductsection${chl.pointseId}" class="zltda">${chl.section}</a>
         </div>
        </c:if>
</c:forEach>
0 0