<c:forEach var="i" begin="1" end="9" varStatus="status">
       ${status.index}
</c:forEach>

通过varStatus="status"  然后使用 ${status.index}可以取得循环的次数,第几次循环

 

<c:forEach var="user" items="${list }" varStatus="i"> ${i.count}</c:forEach>

count计数,循环累加,1,2,3,....

相关文章:

  • 2021-06-11
  • 2021-07-21
  • 2021-08-16
  • 2022-12-23
  • 2022-12-23
  • 2022-01-10
  • 2022-02-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-08
  • 2021-11-15
  • 2022-12-23
  • 2022-02-25
相关资源
相似解决方案