<table width="100%" border="0" align="center">
<tr>
<td width="3%" height="26"><input type="checkbox" name="selectall" id="selectall"/></td>
<td width="18%">用户代码</td>
<td width="19%">用户名称</td>
<td width="20%">联系电话</td>
<td width="19%">email</td>
<td width="21%">创建日期</td>
</tr>
<c:if test="${empty users}">
无数据
</c:if>
<c:if test="${!empty users}">
<c:forEach items="${users}" var="user" varStatus="status">
<c:if test="${status.index %2 == 0}">
<tr>
</c:if>
<c:if test="${status.index%2 != 0}">
<tr bgcolor="blue">
</c:if>
<td width="3%" height="26"><input type="checkbox" name="selectFlag" value="${user.userid }"></td>
<td width="18%">
${user.userid }
</td>
<td width="19%">
${user.username }
</td>
<td width="20%">
${user.contacttel }
</td>
<td width="19%">
${user.email }
</td>
<td width="21%">
${user.createdate }
</td>
</tr>
</c:forEach>
</c:if>
</table>
jstl el表达式 判断集合是否为空 以及循环遍历输出
最新推荐文章于 2021-06-11 12:15:24 发布