jQuery复选框全选和全选取消

jQuery(".salaryIds").each(function(){
    if(jQuery("#salaryIds").attr("checked")=="checked"){
        jQuery(".salaryIds").attr("checked","checked");
    }else{
        jQuery(".salaryIds").removeAttr("checked");
    }
    console.log(jQuery(this).attr("checked"));
}); 

 

posted @ 2017-04-25 16:38  tankuai  阅读(129)  评论(0编辑  收藏  举报