jsp在select中的option中编写if标签

Posted 爱跳舞的程序员

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了jsp在select中的option中编写if标签相关的知识,希望对你有一定的参考价值。

<select onchange="lxx(this)">
<option value="">全部</option>
<option value="水电" <c:if test=‘${lx=="水电"}‘>selected=selected</c:if> >水电</option>
<option value="火电" <c:if test=‘${lx=="火电"}‘>selected=selected</c:if>>火电</option>
<option value="风电" <c:if test=‘${lx=="风电"}‘>selected=selected</c:if>>风电</option>
<option value="光伏" <c:if test=‘${lx=="光伏"}‘>selected=selected</c:if>>光伏</option>
</select>







以上是关于jsp在select中的option中编写if标签的主要内容,如果未能解决你的问题,请参考以下文章