2012-07-04 2 views

답변

1
var arr = $.map($('input[type="checkbox"]:checked'),function(checkbox){ 
        return checkbox.value; 
       }) 
1

이 작업을 시도 할 수 있습니다 :

function updateTextArea() {   
    var allVals = []; 
    $('#c_b :checked').each(function() { 
     allVals.push($(this).val()); 
    }); 
    $('#t').val(allVals) 
    } 
$(function() { 
    $('#c_b input').click(updateTextArea); 
    updateTextArea(); 
}); 
관련 문제