Select 不能选中的方法

来源:互联网 发布:公务用车软件开发 编辑:程序博客网 时间:2024/06/03 05:02
<select id="portfolioDto.type" name="portfolioDto.type" <c:if test="${action!='add'}">disabled="true"</c:if>>
<option value="1" <c:if test="${portfolioDto.type==1}">selected</c:if>>受托户</option>
<option value="2" <c:if test="${portfolioDto.type==2}" > selected</c:if>>投资组合</option>
</select>



用disabled="true"
另外dto接受不到值的 需要input type=hidden 传到action
原创粉丝点击