Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
Select your favorite fruit:
<select onchange="myFunction(this)">
  <option>Apple</option>
  <option>Orange</option>
  <option>Pineapple</option>
  <option>Banana</option>
</select>
<p id="demo"></p>
<script>
function myFunction(selTag) {
  var x = selTag.options[selTag.selectedIndex].text;
  document.getElementById("demo").innerHTML = "You selected: " + x;
}
</script>
</body>
</html>