Results 1 to 3 of 3
Mar 2, 2012, 20:38 #1
- Join Date
- Jun 2008
- Madison, WI
- 28 Post(s)
- 0 Thread(s)
get check radio button value with js
I am having a brain f@rt, or maybe a code related pre-senior moment.
I thought a radio button set had a js property, similar to selectedIndex of a dropdown list that would allow you to easily retrieve the value of a checked button.
I know how to do this in jQuery via ":button :checked", or in js with a foreach loop to iterate through the button elements an attaching an event listener to each one. Which is fine it just seems convoluted if there was already a native way of doing this. Have I really forgotten something or am I just dreaming?Tips for better/ faster SitePoint forum answers
Brilliant ideas, elegant execution.
Graphic Design, Art Direction, Copywriting and Web Design.