EL表达式向select中赋值

来源:互联网 发布:vmware 端口转发 编辑:程序博客网 时间:2024/06/06 17:38

在使用el表达式的时候,有时需要向select下拉菜单中赋值,可以使用三目运算法进行赋值。

<select class="form-control" id="type" name="type">                                             <option ${notify.type eq 'tzgg'?'selected':''} value="tzgg">通知公告</option>                                             <option ${notify.type eq 'swzl'?'selected':''} value="swzl">失物招领</option>                                     </select>
原创粉丝点击