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:

How to use request module in node js

16-03-2017 request module node js

How to convert html to pdf in Node js

12-03-2017 pdf convert html node js

Get previous date from given date in javascript

06-03-2017 date javascript previous date

Filters for convert text to camel case in Angular Js

05-03-2017 angularjs camelcase filters

Sample Validations in javascript

22-02-2017 validations javascript