SoFunction
Updated on 2025-03-01

JS code to get the selected text content of the select element


var sel=(id);//select element id
var index=;//Get the index of the selected option
var textsel= [index].text;//Get the content of the corresponding option