how can we take selected index value of dropdown in javascript code example
Example: how can we take selected index value of dropdown in javascript
var e = document.getElementById("selectElementID");
var value=e.selectElement.options[e.selectedIndex].value;// get selected option value
var text=e.options[e.selectedIndex].text;//get the selected option text