码迷,mamicode.com
首页 > Web开发 > 详细

如何在JSTL中获取数组或者list对象的索引值(index)

时间:2014-08-13 18:31:36      阅读:292      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   for   ar   div   代码   amp   

<c:forEach items="${productList}"
               var="products"   varStatus="status">
      产品序号:${status.count}&nbsp;产品名称:${products.name}
</c:forEach>

上面代码中的varStatus是关键,${status.count}即是我们要的数组的索引值。

如何在JSTL中获取数组或者list对象的索引值(index),布布扣,bubuko.com

如何在JSTL中获取数组或者list对象的索引值(index)

标签:style   blog   color   for   ar   div   代码   amp   

原文地址:http://www.cnblogs.com/liughost/p/3910478.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!