Skip to content

Instantly share code, notes, and snippets.

@nextechu
Created March 29, 2014 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nextechu/9861958 to your computer and use it in GitHub Desktop.
Save nextechu/9861958 to your computer and use it in GitHub Desktop.
var checkedValue;
var elements = document.getElementsByTagName('input');
for (var n = 0; n < elements.length; n++) {
if (elements[n].type == 'radio' &&
element[n].name == 'someRadioGroup' &&
elements[n] == checked {
checkedValue = elements[n].value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment