欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jquery顯示隱藏input對象

 更新時間:2014年07月21日 11:39:35   投稿:hebedich  
這篇文章主要介紹了jquery顯示隱藏input對象,需要的朋友可以參考下

1 所屬部門選擇其他時 顯示一個輸入框進行填寫

#html
<select id='deptid' name='deptid' class="select" onchange='deptChange()'>
 <c:forEach var="item" items="${deptidList}" varStatus="status">
 <option value='${item.value}'>&nbsp;${item.name}&nbsp;</option>
 </c:forEach>
</select> 
<!-- 類型為其他時 需要填寫其它部門 -->
<input id='otherDept' name='otherDept' type="text" class="text" maxlength='50' style='display:none;'/>
//js
// 根據(jù)切換是否顯示其他部門輸入框
 function deptChange(){
 var deptid = $('#deptid').val();
 // alert('type:'+hytpye);
 if(deptid=='other'){
  $('#otherDept').show();
 }else{
  $('#otherDept').hide();
 }
 }

相關(guān)文章

最新評論