SyntaxFix
Write A Post
Hire A Developer
Questions
I've got one more additional option to get value by id:
id
var idElement = document.getElementById("idName"); var selectedValue = idElement.options[idElement.selectedIndex].value;
It's a simple JavaScript solution.
JavaScript