58,454
社区成员
发帖
与我相关
我的任务
分享
<!-- 比如 你 request中存的集合变量为list -->
<table>
<thead>
<tr>
<th>id</th>
<th>姓名</th>
<th>性别</th>
<th>薪水</th>
</tr>
</thead>
<tbody>
<c:forEach items="${list }" var="item" varStatus="status">
<tr bgcolor="${status.index % 2 ==0 ? 'gray' : 'green' }">
<td>${item.id }</td>
<td>${item.name }</td>
<td>${item.sex }</td>
<td>${item.salary }</td>
</tr>
</c:forEach>
</tbody>
</table>