How to get drop down value when drop down change using javascript
onchange
events
dropdown
javascript
functions
Here is the sample example to the get value from the drop down
Here the code is
<script> function changeFunction(){ var color = document.getElementById('color').value; alert(color); } </script> <select onchange="changeFunction()" id="color"> <option value="black">Select Black</option> <option value="red">Select Red</option> <option value="blue">Select Blue</option> <option value="green">Select Green</option> </select>
You might also like:
Compare the Triplets | Javascript | hackerrank.com07-05-2020 hackerrank.com |
How to upload file by using request module18-03-2017 request module node js |
How to make an http request in node js14-03-2017 http module node js |
Filter for insert HTML in Angular Js06-03-2017 filter show html angular js html |
Get Unique values from array/object in javascript19-02-2017 javascript unique remove repeated values from array |