Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get selected text of html dropdown in javascript

var e = document.getElementById("selectElementID");
var value=e.options[e.selectedIndex].value;// get selected option value
var text=e.options[e.selectedIndex].text;
 
PREVIOUS NEXT
Tagged: #selected #text #html #dropdown #javascript
ADD COMMENT
Topic
Name
9+8 =