Last active
August 29, 2015 14:08
-
-
Save victorpendleton/735774745d3a03bc3100 to your computer and use it in GitHub Desktop.
Display value of checked radio button
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var rbtn = document.getElementsByName("objname"); | |
var nbtns = rbtn.length; | |
for (i=0; i<nbtns; i++) { | |
if (rbtn[i].checked) { | |
window.alert(rbtn[i].value); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment