
您可以调用
varStatus.index获取当前迭代的索引,然后将其用作第二个列表的查找。
例如,如果您有两个列表
people.firstnames,则
people.lastnames可以执行以下 *** 作:
<c:forEach var="p" items="${people.firstnames}" varStatus="status"> <tr> <td>${p}</td> <td>${people.lastnames[status.index]}</td> </tr></c:forEach>欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)