title: How to get selected value from Dropdown list in JavaScript
body: <p>How can you get the selected value from drop down list using JavaScript? I have tried the following but it does not work.</p>
  
  <pre><code>var sel = document.getElementById('select1');
  var sv = sel.options[sel.selectedIndex].value;
  alert(sv);
  </code></pre>