js 数据存入数组

    var tag = [];
    $('.deltag').each(function(){
            if($(this).attr("checked")== 'checked'){
                tag.push($(this).attr('value'));
            }
    });
原文地址:https://www.cnblogs.com/isungge/p/4748654.html