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 Get Your Blogs Posts Using Blogger API30-07-2017 blogger api json php |
How to submit form using javascript or jquery.16-04-2017 javascript jquery submit form |
How to use request module in node js16-03-2017 request module node js |
Convert Time 24 hrs to 12 hrs format In javascript12-03-2017 date javascript 12hrs convert |
Get next date from given date in javascript06-03-2017 date javascript next date |