设置 “select”属性即可,如:
<span style="font-size:18px;"><select class="fl" id="search_CityId" name="search_City"> <option value="0" selected="selected">不限</option> </select></span>
撸主用的是springMVC框架,后台将select需要绑定的数据,放入model,model.addAttribute("dataList", dataList);
JSP页面用forEach循环即可搞定:
<span style="font-size:18px;"><li class="clear"> <label class="fl">产品:<em style="color:red">*</em></label> <select id="crt_Product" tabindex="10"> <c:forEach items="${dataList }" var="data" > <option value="${data}" >${data}</option> </c:forEach> </select> </li></span>
时间: 2024-11-11 20:06:23