• checkbox


    $(document).ready(function(){
                var page_id = {/$page_id/};
                var location_id = {/$location_id/};
                var locationlist = {/json_encode($location_list)/};
                addLocation(locationlist,page_id,location_id);
                $("#page_id").on('change',function(){
                    addLocation(locationlist,$(this).val(),location_id);
                });
    //if($("#agree").attr("checked")==true){
                $('#other').click(function(){
                    if($(this).is(':checked')){
                        $(this).parent().parent().next().next().attr("disabled",false);
                    } else{
                        $(this).parent().parent().next().next().attr("disabled",true);
                    }
                })
    
                $(".desc").click(function(){
                    var chkbox=$(this).parent().parent().find('input[name=description_]');
                    var v="";
                    for(var i=0;i<chkbox.length;i++){
                        if((i+1)!=chkbox.length){
                            if(chkbox[i].checked) v+=chkbox[i].value+",";
                        }
                    }
                    $(this).parent().parent().next().val(v);
                });
    
                $("input[name=check]").click(function(){
                    if($(this).is(':checked')&&$(this).val()==2){
                        $(this).parent().next().find('.desc').attr("disabled",true);
                        $(this).parent().parent().find('#qita').attr("disabled",true);
                        $(this).parent().parent().find('#description_all').val('');
                        $(this).parent().parent().find('#qita').val('');
                        var chkbox=$(this).parent().parent().find('input[name=description_]');
                        chkbox.each(function(){
                            $(this).attr("checked",false);
                        })
                    } else{
                        $(this).parent().next().find('.desc').attr("disabled",false);
                        //$(this).parent().parent().find('#qita').attr("disabled",false);
                    }
                })
            });
  • 相关阅读:
    Python正课132 —— Vue 进阶5
    Python正课131 —— Vue 进阶4
    Python正课130 —— Vue 进阶3
    logging模块
    作业20
    suprocess模块
    configparser模块
    hashlib模块
    shutil模块
    序列化模块
  • 原文地址:https://www.cnblogs.com/afei-happy/p/5650243.html
Copyright © 2020-2023  润新知