我想使用JSTL forEach循环中的计数,但我的代码似乎无法工作。
<c:forEach items="${loopableObject}" var="theObject" varStatus="theCount">
<div id="divIDNo${theCount}">
</div>
</c:forEach>
产生
<div id="divIDNojavax.servlet.jsp.jstl.core.LoopTagSupport$1Status@5570e2" >
发布于 2011-07-09 09:41:19
你可以试试这个。相似的结果
<c:forEach items="${loopableObject}" var="theObject" varStatus="theCount">
<div id="divIDNo${theCount.count}"></div>
</c:forEach>
https://stackoverflow.com/questions/6600738
复制相似问题