How to select an option from the HTML select box using jQuery?

saluar

New Member
How do I select an option from the HTML select box using jQuery? I am using select box (single choice), not drop-down. I need to get the choice value and the text.Here is my code, but it's missing the jQuery function:\[code\]<html> <head> <script type='text/javascript'> val choiceVal = "None!"; val choiceText = "None!"; //So what is the function? </script> </head> <body> <select id="myListChoices"> <option value="http://stackoverflow.com/questions/15592298/1">Choice 1</option> <option value="http://stackoverflow.com/questions/15592298/2">Choice 2</option> <option value="http://stackoverflow.com/questions/15592298/3">Choice 3</option> </select> </body></html>\[/code\]
 
Back
Top