jsp中的varStatus 的index用法

来源:互联网 发布:北斗星导航软件 编辑:程序博客网 时间:2024/05/17 22:53

.

<c:forEach items="${requestScope.allroles}" var="role" varStatus="loopStatus">
  <c:when test="${0==loopStatus.index%2}">
  </c:when》
</c:forEach>

int n=100;
for(int i=0;i<n;i++) {

}

这里loopStatus.index和for循环的迭代变量i作用一样

原创粉丝点击