Posts Tagged ‘radio’

I’m sure I’ve had to do this many times in my life, and I thought there was an easier way. This is fairly elegant, just passing the name of the radios. (This is basic of the basics.) function radioSelected(radioGroup){   for (i = 0; i < radioGroup.length; i++){     if (radioGroup[i].checked)         return true;   }   return false; } […]