首页 > Web开发 > 详细

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

时间:2014-08-13 18:31:37      阅读:702      评论:0      收藏:0      [点我收藏+]
<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)

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!