JSP同时遍历两个集合
2018-03-14 18:04
106 查看
<c:forEach items="${listOne}" var="item" varStatus="loop">
<tr>
<td>${item.id}</td>
<td>${item.name}</td>
<td>${item.age}</td>
<td>${listTwo[loop.count-1].property}</td>
</tr>
</c:forEach>Name of the exported scoped variable for the status of the iteration. Object exported is of
type javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested visibility.
index 当前这次迭代从 0 开始的迭代索引count 当前这次迭代从 1 开始的迭代计数
<tr>
<td>${item.id}</td>
<td>${item.name}</td>
<td>${item.age}</td>
<td>${listTwo[loop.count-1].property}</td>
</tr>
</c:forEach>Name of the exported scoped variable for the status of the iteration. Object exported is of
type javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested visibility.
index 当前这次迭代从 0 开始的迭代索引count 当前这次迭代从 1 开始的迭代计数
相关文章推荐
- jsp中使用<c:foreach>同时遍历两个list集合
- 两个集合直接的操作 如何jsp页面迭代遍历,js如何写函数
- 在JSP中用自定义标签实现集合的遍历——山寨版c:foreach
- <c:foreach>同时遍历两个List的方法,List长度最好一致的
- [链表]同时遍历两个链表
- 遍历两个集合去除相同的ID
- 有3个集合, 从其中一个集合中删除同时存在于另外两个集合的元素
- JSP标准标签遍历数组、集合
- cforeach同时遍历两个List的方法
- python zip函数同时遍历两个数组和构造字典
- 已知两个链表A和B分别表示两个集合,其元素递增排列。请设计算法求出两个集合A和B的差集(即仅由在A中出现而不在B中出现的元素所构成的集合),并以同样的形式存储,同时返回该集合的元素个数。
- <c:foreach>同时遍历两个List的方法
- jsp遍历map集合
- C#比较两个list集合,两集合同时存在或A集合存在B集合中无
- 遍历List集合同时删除元素的正确方法
- 为什么Hibernate不允许同时抓取两个和两个以上的平行bag集合
- 在JSP中用自定义标签实现集合的遍历——山寨版c:foreach
- Jsp使用<c:forEach>遍历List集合
- jsp中if判断和遍历集合
- [C++]for同时遍历两个数组