foreach标签中的单独项目(jstl) [英] Separate item in foreach tag (jstl)
本文介绍了foreach标签中的单独项目(jstl)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个带有JSTL的JSP页面,我希望用< hr>
标记将用户与其他用户分开。我该如何解决?
I have a JSP page with JSTL and I want to separate an user from other with an <hr>
tag. How can I solve it?
<c:forEach var="user" items="${list_users}">
<c:out value="${user.name}"/>
<c:out value="${user.surname}"/>
</foreach>
推荐答案
您可以使用表格绘制每个用户单元格,然后输入< hr>
You can use a table to draw each user in the cell, then put <hr>
<table>
<c:forEach var="user" items="${list_users}">
<tr><td>
<c:out value="${user.name}"/><br>
<c:out value="${user.surname}"/><br>
<hr>
</td></tr>
</c:foreach>
</table>
这篇关于foreach标签中的单独项目(jstl)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文