Like the title says, what\'s the best way in JavaScript to get all radio buttons on a page with a given name? Ultimately I will use this to determine which specific radio b
var radios = document.getElementsByTagName('input');
for (i = 0; i < radios.length; i++) {
if (radios[i].type == 'radio' && radios[i].checked) {
nbchecked++;
}
}