• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 260
  • Last Modified:

Get current text of dropdownlist

Please provide jQuery code to get the text of the dropdownlist.

This is not based upon what is selected, just what appears inside the text.  I want to get the text whether or not something has ever been picked from the drop down list items or not.
0
Tom Knowlton
Asked:
Tom Knowlton
  • 2
  • 2
1 Solution
 
leakim971PluritechnicianCommented:
use : $("option:selected").text()

test page : http://jsfiddle.net/jzAzM/
0
 
Tom KnowltonWeb developerAuthor Commented:
thx
0
 
leakim971PluritechnicianCommented:
for a specific dropdown : $("option:selected", "#yourdropdownid").text()

http://jsfiddle.net/jzAzM/2/
0
 
Tom KnowltonWeb developerAuthor Commented:
Okay...thanks!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now