jsp中select标签解决默认选中问题
时间:2014-09-11 02:22:22
收藏:0
阅读:464
例如:根据timeBucket的值得不同,默认后台控制选中不同的值
<select name="timeBucket${c.id}" style="width: 80px" id="timeBucket${c.id}" class="span4 pull-left">
<option value="0" <c:if test="${c.timeBucket==‘0‘}">selected="selected"</c:if>>上午</option>
<option value="1" <c:if test="${c.timeBucket==‘1‘}">selected="selected"</c:if>>下午</option>
</select>
原文:http://hhpdhn.blog.51cto.com/4944326/1550955
评论(0)