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
For the text of the selected item, use:
For the value of the selected item, use:
This works for me
If the element created dynamically
That will help you to get right direction. Above code is fully tested if you need further help let me know.
Please use this
Then Please alert "selValue" and "selText". You get your selected dropdown value and text
the following worked for me: