12
rated 0 times
[
17]
[
5]
/ answers: 1 / hits: 87094
/ 14 Years ago, mon, february 21, 2011, 12:00:00
I have something like this:
select = document.getElementById(select);
select.onchange = function(){
alert(this.value); //returns the selected value
alert(this.innerHTML); //returns the entire select with all the options
alert(this.selected.innerHTML); //this is what I want, but doesn't work, of course
};
How can I get the innerHTML of the selected option in pure js? (no frameworks).
More From » dom