Jump to content
  • Advertisement
Sign in to follow this  
Sonnenblume

[web] Quick javascript Question

This topic is 4222 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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!