How to use jQuery to get the checked checkboxes values, and put it into a textarea immediately?
Just like this code:
&l
Thanks altCognito, your solution helped. We can also do this by using name of the checkboxes:
function updateTextArea() {
var allVals = [];
$('[name=chkbox]:checked').each(function() {
allVals.push($(this).val());
});
$('#t').val(allVals)
}
$(function() {
$('#c_b input').click(updateTextArea);
updateTextArea();
});