Jump to content

Javascript + Drop Down Lists


Recommended Posts

Try this....<script language="javascript">function test1(va){var opt = va.selectedIndex;var val = va.options[opt].value;document.write(val);}</script><SELECT name="opt" style="WIDTH: 200px" onchange="test1(this)"><OPTION value="option 1">option 1</OPTION><OPTION value="option 2">option 2</OPTION><OPTION value="option 3">option 3</OPTION><OPTION value="option 4">option 4</OPTION></SELECT>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...