我用 jstl标签开发: <c:forEach items="${listAccessCount}" var="lac">
<tr>
<td>这里如何去循环遍历标号?比如1,2,3,4,5......
<td colspan="2" width="100%">
<a href="#">
<c:out value="${lac.repositoryTitle}" ></c:out>
</a>
</td>
</tr>
</c:forEach>问下 如何取循环遍历的标号呢?
<tr>
<td>这里如何去循环遍历标号?比如1,2,3,4,5......
<td colspan="2" width="100%">
<a href="#">
<c:out value="${lac.repositoryTitle}" ></c:out>
</a>
</td>
</tr>
</c:forEach>问下 如何取循环遍历的标号呢?
${status.count}//就是你要的东西
</c:forEach>
status是一个实现了loopTagStatus的对象,常用的有status.index, status.count, status.isFirst, status.isLast
<c:out value="${temp}" />
</c:forEach>循环输出1-10.
<tr>
<td>标号:<c:out value="${status.count}" ></c:out></td>
<td width="100%">
<a href="#">
<c:out value="${lac.repositoryTitle}" ></c:out>
</a>
</td>
</tr>
</c:forEach>