全选反选

$("#sel-all").click(function(){  //点击全选按钮
            if($("input[type='checkbox']").attr("checked")=="checked"){
                $("input[type='checkbox']").attr("checked","true");
            }else{
                $("input[type='checkbox']").removeAttr("checked");
            }

        })

 

posted @ 2018-03-19 16:45  心随风飞lss  阅读(100)  评论(0编辑  收藏  举报