jstl取forEach下标
1、
<c:forEach items="${signBusList}" var="sign" varStatus="xh">
${xh.count}序号从1开始
${xh.index}序号从0开始
${xh.last}最后一个序号
${xh.first}第一个序号
</cforEach>
2、
<c:set value="${(page.pageNo-1)*page.pageSize}" var="i" scope="page"/>
<c:forEach var="preference" items="${page.list}" varStatus="status">
<c:set value="${pageScope.i + 1}" var="i" scope="page"/>
序 号:${pageScope.i}
</c:forEach>
3. <c:forEach var="entity" items="${pageData.result}" varStatus="xh">
<tr>
<td>${xh.count}</td>
<c:forEach items="${signBusList}" var="sign" varStatus="xh">
${xh.count}序号从1开始
${xh.index}序号从0开始
${xh.last}最后一个序号
${xh.first}第一个序号
</cforEach>
2、
<c:set value="${(page.pageNo-1)*page.pageSize}" var="i" scope="page"/>
<c:forEach var="preference" items="${page.list}" varStatus="status">
<c:set value="${pageScope.i + 1}" var="i" scope="page"/>
序 号:${pageScope.i}
</c:forEach>
3. <c:forEach var="entity" items="${pageData.result}" varStatus="xh">
<tr>
<td>${xh.count}</td>
声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。
- 上一篇:没有了
- 下一篇:没有了