jsp页面一些用法

1.select回显值问题

    <select    id="save_year"   name="save_year" style="height:25px;width:160px" >
<option value="2"  <c:if test="${save_year==2}">selected="selected"</c:if>>2年</option>
<option value="5"  <c:if test="${save_year==5}">selected="selected"</c:if>>5年</option>
<option value="10" <c:if test="${save_year==10}">selected="selected"</c:if>>10年</option>

   </select>


  js写法

  if(!isEmpty(authenticateStatus)) $("#save_year").val(save_year); 


猜你喜欢

转载自blog.csdn.net/qianxiaopeng/article/details/80509613