onchange="myFunction()">, W3Schools is optimized for learning and training. This site makes use of Cookies. How can I recognize one? My code is htmlData.push(' dropdown is changed I want the value of the dropdown before change. Great solution, much better than selected answer! Find centralized, trusted content and collaborate around the technologies you use most. Get selected value of dropdown in JavaScript/jQuery on change This post will discuss how to get the selected value of dropdown in JavaScript and jQuery onchange event. BTW: I am using "manual" form validation (see "is-valid"/"is-invalid"), because I (and users) didn't like that BS4 marks non-required empty fields as green. and text. If you do not want any plugin to be seen, make it as tiny as possible? You can grab the value in one line: I wonder that everyone has posted about value and text option to get from