Jump to content
  • Advertisement
Sign in to follow this  

[web] Quick javascript Question

This topic is 4136 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Say I have the following html... <form name=example> <select name=test onChange='Choice();'> <option value="1">One</option> <option value="2">Two</option> <option value="3">Three</option> </select> </form> How would I access the value between the 2 option tags for the purposes of copying it into a text field? I know how to do it if I wanted the actual value (i.e. 1, 2 or 3), but how would I access the actual text (one, two, three). I know for the former I would use something like "myTextField.test.value = example.test.value;" but how would I do the latter.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!