java如何在编辑时突出显示多选框选定项
<select name="projecttype" class="selt-box" onfocus="window.dropdown_menu_hack(this)">
<c:forEach items="${lookupdetails}" var="lookupdetails" >
<c:if test="${not empty lookupdetails.lookupName && lookupdetails.lookupId==16}"> <option value="${lookupdetails.lookupdetailId}">${lookupdetails.lookupName}</option>
</c:if>
</c:forEach>
</select>
上面的代码是一个多选框。请告诉我如何使所选值突出显示。。编辑时。。
我使用了控制器中的value = ${xx}
,它是所选的值。。它不起作用。。pl帮助
# 1 楼答案
这可以通过使用spring的表单:select标记来存档。请看一看可以涵盖您的场景的片段
Spring将为lookupDetails集中的对象生成预先选择的html
问候,, 赫曼斯