Option selected index : Option Select ComboBox : Form Control JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Form Control » Option Select ComboBox »

 

Option selected index



<html>
<head>
<script language="JavaScript">
<!--
function selectChange() {
   selIdx = document.forms[0].marsupials.selectedIndex;
   newSel = document.forms[0].marsupials.options[selIdx].text;
   alert("Selection has changed to: " + newSel);
}
//-->
</script>
</head>
<body>
<basefont size=4>
<form>
Please choose a city:
<select name="marsupials" onChange="selectChange()">
<option>A
<option>B
<option>C
</select>
</form>
</body>
</html>

           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Form Control
» Option Select ComboBox