ameliabob Posted May 30, 2018 Share Posted May 30, 2018 I am having trouble finding where the attributes for getElementById are located <input id='opt' type='radio' name='kind' value='O'>Options <input id='stk' type='radio' name='kind' value='S'>Stocks How in js do I determine which one of these was chosen? getElementById('stk').value doesn't seem to work when going after the one not chosen. I seem to think there might be "selected" attribute but I can't find it documented anywhere. Thanks Link to comment Share on other sites More sharing options...
dsonesuk Posted May 30, 2018 Share Posted May 30, 2018 It has to be checked true to show as selected https://www.w3schools.com/jsref/prop_radio_checked.asp Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now