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:

File Upload Using Angular Js and Node Js

28-05-2018 AngularJs Node js file upload multer module

How to use http-post request in node js

14-03-2017 http-post module node js

Filter for change Date format (MM-dd-yyyy) in Angular Js

05-03-2017 mm-dd-yyyy date formats angular js

Filters for convert text to camel case in Angular Js

05-03-2017 angularjs camelcase filters

How to get drop down value when drop down change using javascript

27-02-2017 onchange events dropdown javascript functions