<script type="text/javascript">
var x=document.getElementById("mySelect").selectedIndex;
alert(document.getElementsByTagName("option")[x].value);
Select your favorite fruit:
<option value="apple">Apple</option>
<option value="orange">Orange</option>
<option value="pineapple">Pineapple</option>
<option value="banana">Banana</option>
<input type="button" onclick="alertValue()" value="Alert selected value">