JSTL中foreach标签结合select标签使用

<select	class="form-control" id="custIndustry"  name="custIndustry">
	<option value="">--请选择--</option>
	<c:forEach items="${industryType}" var="item">
			<option value="${item.dict_id}"<c:if test="${item.dict_id == vo.custIndustry}"> selected</c:if>>${item.dict_item_name }</option>
	</c:forEach>
</select>

猜你喜欢

转载自blog.csdn.net/feizai1208917009/article/details/86099473