title: Get the selected value of a dropdown list
body: <p>I have the follwing code. I want to get the value of the selected value of the dropdownlist once the user changes it or to have the default value to be displayed by alert(). I need to use alert() from within the &lt; body > of the html. Is that possible?</p>
  
  <pre><code>&lt;html&gt;
   &lt;head&gt;
   &lt;title&gt;Title&lt;/title&gt;
   &lt;script type="text/javascript" src="phonegap-1.4.1.js"&gt;
  &lt;/script&gt; &lt;script type="text/javascript" src="JS/Util.js"&gt;&lt;/script&gt;
   &lt;script type="text/javascript" src="JS/Language.js"&gt;&lt;/script&gt;
   &lt;script type="text/javascript"&gt;
     function dropdown(){
    var drp = document.getElementById("numberlist");
   var optn = document.createElement("OPTION");
   optn.text="3";
   optn.value="3";
   drp.add(optn);
   }
      &lt;/script&gt;
   &lt;/head&gt;
    &lt;body onload="dropdown();"&gt; &lt;div id="main3"&gt;&lt;/div&gt;  &lt;form&gt;&lt;select id = "numberlist"&gt;&lt;option&gt;12&lt;/option&gt;&lt;option&gt;24&lt;/option&gt;&lt;option&gt;36&lt;/option&gt;&lt;/select&gt;
  </code></pre>
  
  <p>  
      
  
  <blockquote>
    <p></p>
  </blockquote>