jquery实现全选和全不选

//全选
    function chooseAllsla(_obj){
        var tableObj = $(_obj).closest("table");
        var isChecked = $(_obj).attr("checked");
         $(tableObj).find(":input[type='checkbox']").not(":first").each(function(){
            if(isChecked){
                $(this).attr("checked",true);
            }else{
                $(this).removeAttr("checked");
            }                   
        });
    }

你可能感兴趣的:(jquery实现全选和全不选)