I want to know how can I get the value of the selected option whenever I change the value combobox. Here's my code:
<html>
<head>
<script type="text/javascript">
function dispOptionValue() {
var select = document.getElementById('footballPlayers');
alert(select.options.value);
}
</script>
</head>
<body>
<select id="footballPlayers" onchange="dispOptionValue">
<option value="1">Ricardo Kaka</option>
<option value="2">Cristiano Ronaldo</option>
<option value="3">Johan Crujjf</option>
<option value="4">Gerd Muller</option>
<option value="5">Franz Beckenbauer</option>
</select>
</body>
</html>
I know its wrong but I don't have any idea how to start. Please help.