get selected option value javascript

Note: The value "-1" will deselect all options (if any). In this post, we will see how to get selected value of dropdown in JavaScript and jQuery onchange event. To get the selected option value first, we need to access the element that are currently selected. Now, we need to get the above element’s value when a particular