c:forEach 显示下拉框并回显


<select class="form-control" data-validate="required" id="gender" name="gender">
<c:if test="${not empty gender}">
<c:forEach items="${gender}" var="c">
<option value="${c.description}"
<c:if test="${c.description==user.gender}">selected</c:if>
>${c.description}</option>
</c:forEach>
</c:if>
</select>

 

 

posted @ 2018-10-15 16:10  baby丽君君  阅读(3451)  评论(0编辑  收藏  举报