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
SubReport pushes text and controls of Main Access report
Styling a Dropdownlist using CSS
Exchange 2007 to Exchange 2010 - move mailbox - cross forest
Motorola MC50 Activesync Problem
Securing a web service call
Unable to install any framework .NET in XP Mode (Virtual PC)
How does this web site manage to pull data from many different sources?
string extract
Is there any code of SATA interface in VHDL?
Mail enabled Security Groups in Powershell