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 insert bulk information into database in single query execution18-03-2017 insert sql bulk database |
Sanitization in java sript14-03-2017 sanitization java script |
Convert Time 24 hrs to 12 hrs format In javascript12-03-2017 date javascript 12hrs convert |
How to convert html to pdf in Node js12-03-2017 pdf convert html node js |
Get random strings from given string In javascript21-02-2017 javascript random string |