zoukankan      html  css  js  c++  java
  • Jquery 点击父类全选子类 , 子类选父类

    <p>
       <label style="font-size:18px;font-weight: bold;" class="checkboxs">
          <input type="checkbox" name="faci_in_checkbox[]" value="56" class="">&nbsp;B超          
       </label>
       <span>
            <label style="margin-left:0px;" class="auth_rules">
               <input type="checkbox" name="faci_in_checkbox[]" value="65" class="">腹部B超
            </label>
           <label style="margin-left:0px;" class="auth_rules"><input type="checkbox" name="faci_in_checkbox[]" value="66">甲状腺B超</label>
           <label class="auth_rules"><input type="checkbox" name="faci_in_checkbox[]" value="76">  的说法士大夫 </label>              
        </span>
    </p>

    $(".checkboxs").click(function (){
        var is_check = $(this).find('input').get(0).checked; //判断是否选中
        $(this).next().find('input').prop("checked",is_check);
    })
    $(".auth_rules").click(function (){
       $(this).parent().parent().children('label').find('input').prop('checked','checked')
    })
  • 相关阅读:
    python基础-运算符和编码
    python介绍
    墨菲定律
    羊皮卷
    循环神经网络层
    ResNet实战
    ResNet实战
    ResNet,DenseNet
    经典卷积网络VGG,GoodLeNet,Inception
    CIFAR100与VGG13实战
  • 原文地址:https://www.cnblogs.com/wtcl/p/6595698.html
Copyright © 2011-2022 走看看