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
Customize Outlook Today by Adding Public Calendar
htaccess Partial Query String Rewrite
How can I uninstall a corrupt broadcom driver?
Charging devices via USB port on laptop
DataGridView
How to re-write code using strings to Delphi 2010
Windows 7 roaming profiles
How to have a Stable Microsoft Outlook profile with 4-5GB+ data w/ MS Exchange Mail server ?
ASP.NET Error: The page was not displayed because the request entity is too large.
posting xml string to web