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
Thunderbird slow to download
unable to scan with my HP Photosmart All-in-one printer
"microsoft exchange offline address book" creates synchronization error log
Windows Service crashing on one machine, not on the other
Excel Sequence
Password recovery on Juniper SA2500
How to reset the sametime password for a single user
Extract email address from an Access memo field.
"outlook.ost cannot be accessed because it has been configured for usw with a different mailbox"
getting an format error using to_char function