How can I get the selected text (not the selected value) from a drop-down list in jQuery?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- How to fix IE ClearType + jQuery opacity problem i
- void before promise syntax
- jQuery add and remove delay
This works fine
For those who are using SharePoint lists and don't want to use the long generated id, this will work:
This work for me:
I'm using jQuery 1.10.2
If you already have the dropdownlist available in a variable, this is what works for me:
The other answers on this question helped me, but ultimately the jQuery forum thread $(this + "option:selected").attr("rel") option selected is not working in IE helped the most.
Update: fixed the above link
Various ways
Select Text and selected value on dropdown/select change event in jQuery