2011-12-05 19 views

risposta

4
$('#' + radio.id).closest('form').find('input:checkbox:checked') 
15

Uso di selezione singola:

$("#formid input:checkbox:checked").each(function() { 
    $(this) // do your staff with each checkbox 
}); 
0
$("input:checkbox[name='type']:checked").each(function() 
{ 
    // add $(this).val() to your array 
}); 
+0

Non vuole filtrare in base al nome, oltre che è necessario citare il valore attr ('[name = "tipo"]') – ThiefMaster

+0

Grazie per la correzione. vuole avere tutti gli elementi selezionati rit? funzionerà? – FosterZ

Problemi correlati