实现select标签回显
1.<select name=”curStatus” >
<option value=”0″>-请选择-</option>
<option value=”1″ <c:if test=”${‘1’ eq curStatus}”>selected</c:if> >男</option>
<option value=”2″ <c:if test=”${‘2’ eq curStatus}”>selected</c:if> >女</option>
</select>
2.<s:select list=”#{0:’–请选择–‘,1:’处理中’,2:’已完成’}” listKey=”key” listValue=”value” name=”curStatus” value=”%{curStatus}”></s:select>
3.<select name=”curStatus” >
<option value=”0″>-请选择-</option>
<option value=”1″ <s:if test=”%{curStatus==1}”>selected</s:if> >处理中</option>
<option value=”2″ <s:if test=”%{curStatus==2}”>selected</s:if> >已处理</option>
</select>
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/16369.html