I am working on a site with several forms of radio buttons, one of which looks like this:
<form id = "configuration"> <ul> <li><input type="radio" name="configuration" id="0" value="0"/> GT Manual</li> <li><input type="radio" name="configuration" id="1" value="1"/> GT Automatic</li> </ul> </form>
THERE is a way (javascript) so that I can directly access the values of the switches, e.g.
var value = document.getElementById("configuration").configuration.value;
(here, the first “configuration” is the form identifier, and the second “configuration” is the name, not the loop through each element in the form, to check which button is selected?
Thanks!
source share