Return to Snippet

Revision: 7425
at July 23, 2008 11:00 by jamesming


Initial Code
<form name=form0>
	<select name="selectFormName" onchange=getValueSelected()>
		<option value="Test A">Test A</option>
		<option value="Test B">Test B</option>
		<option value="Test C">Test C</option>
	</select>
</form>
<br/><br/>

<script>
function getValueSelected(){
	var x = document.form0.selectFormName.selectedIndex;
	alert(document.form0.selectFormName.options[x].value);
};
</script

Initial URL

                                

Initial Description

                                

Initial Title
Get Selected Value

Initial Tags

                                

Initial Language
JavaScript