Js gets the text sample code for the option selected by select
- 2020-03-30 01:00:37
- OfStack
javascript
jQuery
var item = document.getElementById("");
var text = item.options[item.selectedIndex].text;
jQuery
var text = $("#selector")[0].options[$("#selector")[0].selectedIndex].text