JavaScript: How to Get Selected Item in Dropdown Select List
JavaScript can be used to retrieve what the currently selected item is in a dropdown select list. Consider the following example, which shows how to get both the text and value of the selected item in a dropdown select list:
The preceding example uses the selectedIndex property of the dropdown box to return the index of the selected item, with the first item in the list being 0, the second being 1 and so forth. Once the selectedIndex is retrieved, the select box values are referenced as an array. The element retrieved is the element existing in the selectedIndex position.
Related Articles:
JavaScript selectedIndex property
Accessing Form Elements with JavaScript

I’m able to get both of those methods to work in Firefox 2.0 however in IE7 it return nothing?
Is there a special way this needs to be done for IE7?
It helped me 2 solve a critical problem
Thanks a lot 4 this……………
Thank you so much. I found it really useful! )
Good. It’s helpful to me. Thanks!
i want selected item label not its value…
good site it was very usefull to me at the right time .
Thnks it really worked for me.
can u tell me how to get the text
Thanks! This really helped me. I was almost going to traverse the DOM structure until i found this…
This Post really helped me. Thank you.
hi can you tell me how to display select box using DOM and getting selected value from that select box in that function itself
I should note that this does NOT work in IE7.
where was the Testing/QA on this, Joey??
thnks a lot.
Guys,
It looks like you leave me no choice …
I just have to bookmark you
Good stuff — thank you.
Jeff
Thank you very much. It is useful.
gracias.
Thanks, it worked exactly.
agree, doesn’t work on IE7
this works fine on ie[<=7]:
document.write(document.getElementById('colorsselect').options[dropdownIndex].text);
this Soution is too easy to understand.
it really helped me a lot.
Keep writing such solutons…. man.
Thankss.. really need this!!
Hi,
I am working in crm and I am trying to check a checkbox depending on the value selected in a drop down. For example if option 1 is chosen from the drop down then the check box must be checked. I am puuting my code in the onChange event of the drop down in crm but it does not seem to work.
Any help will be highly appreciated.
Do you have sample code for what you’re trying to do?
For the people who want to use this solution, please read this:
This solution does not work in Internet Explorer 7, which is still a great part of the possible visitors of your website.
Please don’t use this solution!
Not working in IE from what I can tell. Keep that in mind. You should write that somewhere.
This absolutely works in IE7. Note that this gets the dropdown’s selected option value, not the displayed text.
Actually, it works fine in IE7. Any evidence to back up that it doesn’t?
Works fine in my IE8, and in the IE9 Platform Preview.
Just how do you get the displayed text, not the ‘value’.
Paul, I’ve updated the example to show how to get the text as well.
simply good stuff . thanks for all.
It’s working thanks
I Love You!!!
Thank you, this is very helpful
i m a BCA student n i jst searched “how to get selected value in combo box”
n this is my 11th site after searching the code n i found it is really very gud site for everyone. it has very very nice stuff (error free). n i will suggest to all my near n dear.