茄子在线看片免费人成视频,午夜福利精品a在线观看,国产高清自产拍在线观看,久久综合久久狠狠综合

    <s id="ddbnn"></s>
  • <sub id="ddbnn"><ol id="ddbnn"></ol></sub>

  • <legend id="ddbnn"></legend><s id="ddbnn"></s>

    jQuery實(shí)現(xiàn)根據(jù)類(lèi)型自動(dòng)顯示和隱藏表單
    來(lái)源:易賢網(wǎng) 閱讀:1769 次 日期:2015-03-19 15:02:54
    溫馨提示:易賢網(wǎng)小編為您整理了“jQuery實(shí)現(xiàn)根據(jù)類(lèi)型自動(dòng)顯示和隱藏表單”,方便廣大網(wǎng)友查閱!

    這篇文章主要給大家分享了jQuery實(shí)現(xiàn)根據(jù)類(lèi)型自動(dòng)顯示和隱藏表單的代碼,非常的簡(jiǎn)單實(shí)用,僅僅10行代碼,推薦給大家,希望能給大家一些提示。

    jquery實(shí)現(xiàn)表單根據(jù)單選按鈕進(jìn)行字段的動(dòng)畫(huà)切換,昨天寫(xiě)的,感覺(jué)比起初學(xué)時(shí)寫(xiě)的js/jquery有了很大進(jìn)步。。在最大化擴(kuò)展性的情況下經(jīng)可能使代碼精簡(jiǎn)。

    html

    代碼如下:

    <div class="control-group">

    <label class="control-label">類(lèi)型:</label>

    <div class="controls control-row-auto" id="type">

    </div>

    <span class="auxiliary-text"></span>

    </div>

    <div class="control-group ctype ctype1 ctype2">

    <label class="control-label">欄目模版:</label>

    <div class="controls">

    <select name="column_tpl" class="input">

    </select>

    </div>

    <span class="auxiliary-text"></span>

    </div>

    <div class="control-group ctype ctype1">

    <label class="control-label">文章模版:</label>

    <div class="controls">

    <select name="article_tpl" class="input">

    </select>

    </div>

    <span class="auxiliary-text"></span>

    </div>

    <input type="hidden" name="tpl" id="tpl" value="" />

    <div class="control-group ctype ctype3" style="display: none;">

    <label class="control-label"><s>*</s>欄目鏈接:</label>

    <div class="controls">

    <input name="url" type="text" class="input-large" data-rules="{required:true,minlength:1,maxlength:30}">

    </div>

    <span class="auxiliary-text">內(nèi)部鏈接格式:模塊/控制器/方法...,外部鏈接格式:http://../../</span>

    </div>

    js

    代碼如下:

    //根據(jù)類(lèi)型自動(dòng)顯示和隱藏表單

    var input_type=$('input[name=type]');

    function typeChangeHandle(){

    var ctypes=$('.ctype');

    var type=$(this).val();

    var hideCtypes=ctypes.filter(':not(.ctype'+type+')').slideUp(500,function () {

    $('.ctype'+type).slideDown(500);

    });

    }

    typeChangeHandle.apply(input_type);

    input_type.on('change',typeChangeHandle);

    input_type=null;

    以上所述就是本文的全部?jī)?nèi)容了,希望大家能夠喜歡。

    更多信息請(qǐng)查看IT技術(shù)專(zhuān)欄

    更多信息請(qǐng)查看腳本欄目
    由于各方面情況的不斷調(diào)整與變化,易賢網(wǎng)提供的所有考試信息和咨詢(xún)回復(fù)僅供參考,敬請(qǐng)考生以權(quán)威部門(mén)公布的正式信息和咨詢(xún)?yōu)闇?zhǔn)!

    2026上岸·考公考編培訓(xùn)報(bào)班

    • 報(bào)班類(lèi)型
    • 姓名
    • 手機(jī)號(hào)
    • 驗(yàn)證碼
    關(guān)于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡(jiǎn)要咨詢(xún) | 簡(jiǎn)要咨詢(xún)須知 | 新媒體/短視頻平臺(tái) | 手機(jī)站點(diǎn) | 投訴建議
    工業(yè)和信息化部備案號(hào):滇ICP備2023014141號(hào)-1 云南省教育廳備案號(hào):云教ICP備0901021 滇公網(wǎng)安備53010202001879號(hào) 人力資源服務(wù)許可證:(云)人服證字(2023)第0102001523號(hào)
    云南網(wǎng)警備案專(zhuān)用圖標(biāo)
    聯(lián)系電話(huà):0871-65099533/13759567129 獲取招聘考試信息及咨詢(xún)關(guān)注公眾號(hào):hfpxwx
    咨詢(xún)QQ:1093837350(9:00—18:00)版權(quán)所有:易賢網(wǎng)
    云南網(wǎng)警報(bào)警專(zhuān)用圖標(biāo)