Microsoft
Software
Hardware
Network
Question : getting text from a listbox in javascripts
Hi, I want to get the text rather than the value of a listbox. If I wanted to get the value, I would use this
var dropdown_value=document.ge
tElementBy
Id("my_dro
pdown").va
lue;
however I want to get the text, how could I do this?
Thanks.
Answer : getting text from a listbox in javascripts
var dropDown = document.getElementById("m
y_dropdown
")
var dropdown_value=dropDown.op
tions[drop
Down.selec
tedIndex].
text;
or
var dropdown_value=dropDown.op
tions[drop
Down.selec
tedIndex].
innerHTML;
Random Solutions
iPhone ActiveSync error: Cannot Get Mail The connection to the server failed. New DigiCert certificate
Recommended approach to consolidating relational CSV data in Excel....
asp.net I have a situation where I need to forms on a page??
Internet Explorer blocking javascript
how to permanently delete wireless profiles
How to test on an Android device
SQL in C# code .. Reading Output Parameters.
vCenter Converter and SBS2008
Split word document and save based on tags
binding data in aspx from sql data source