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


Here is the sample example to the get value from the drop down

 Here the code is 

function changeFunction(){
	var color = document.getElementById('color').value;
<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>


You might also like:

How to search text in string using php ?

29-10-2017 php search string search

Use java script file client side and server side at a time in node js

30-07-2017 node js include call javascript

Detect AdBlock with JavaScript in my browser

30-07-2017 AdBlock javascript detect

How to submit form using javascript or jquery.

16-04-2017 javascript jquery submit form

Filter for insert HTML in Angular Js

06-03-2017 filter show html angular js html