title: How to get the value of a selected text in javascript
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1085801/how-to-get-the-selected-value-of-dropdownlist-using-javascript">How to get the selected value of dropdownlist using JavaScript?</a>  </p>
  </blockquote>
  
  
  
  <p>I have a select: </p>
  
  <pre><code>&lt;select id="short_code"&gt;
  &lt;option value="12"&gt;First&lt;/option&gt;
  &lt;option value="11"&gt;Second&lt;/option&gt;
  &lt;option value="10"&gt;Third&lt;/option&gt;
  &lt;option value="9"&gt;Fourth&lt;/option&gt;    
  &lt;/select&gt;
  </code></pre>
  
  <p>I want to get the value of the selected text. e.g. if the selected text is <code>First</code> so the I need to get <code>12</code>.</p>