var tag = []; $('.deltag').each(function(){ if($(this).attr("checked")== 'checked'){ tag.push($(this).attr('value')); } });