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}'> ${item.name} </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)文章
用jQuery旋轉(zhuǎn)插件jqueryrotate制作轉(zhuǎn)盤抽獎
這篇文章主要為大家詳細(xì)介紹了用jQuery旋轉(zhuǎn)插件jqueryrotate制作轉(zhuǎn)盤抽獎,具有一定的參考價值,感興趣的小伙伴們可以參考一下2017-02-02
jQuery EasyUI 選項卡面板tabs的使用實例講解
下面小編就為大家分享一篇jQuery EasyUI 選項卡面板tabs的使用實例講解,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2017-12-12
jquery給圖片添加鼠標(biāo)經(jīng)過時的邊框效果
鼠標(biāo)經(jīng)過時圖片產(chǎn)生塌陷,實則應(yīng)該將邊框控制直接加在IMG標(biāo)簽上即可,下面有個不錯的示例,大家可以感受下2013-11-11

