下拉框回显
性别
<select class="form-control" name="sex" id="sex"> <%--<option>性别...</option>--%> <option value="0" <c:if test="${talentInfo.sex == '0'}">selected</c:if> >男</option> <option value="1" <c:if test="${talentInfo.sex == '1'}">selected</c:if> >女</option> </select>
遍历的下拉框
<select class="form-control" id="certificaType" name="certificaType"> <%--<option>证件类型...</option>--%> <c:choose> <c:when test="${!empty talentInfo}"> <c:forEach var="c" items="${certificaTypeList }"> <option value="${c.dictCode }" <c:if test="${talentInfo.certificaType eq c.dictCode}">selected="selected"</c:if>> ${c.dictName }</option> </c:forEach> </c:when> <c:otherwise> <c:forEach var="c" items="${certificaTypeList }"> <option value="${c.dictCode }"> ${c.dictName }</option> </c:forEach> </c:otherwise> </c:choose> </select>