实现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>
转载于:https://www.cnblogs.com/sunpx/p/5202807.html