Javascript examples for DOM HTML Element:Select
get selected value on a dropdown field
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){// w w w. j av a2 s . c o m console.log(document.getElementById('select').options[1].value) } </script> </head> <body> <select id="select"> <option value="A">A</option> <option value="B">B</option> <option value="C">C</option> </select> </body> </html>