Jump to content

Forms - Drop Down Menus


skaterdav85

Recommended Posts

I have a html form drop down menu, and i wanted to make it so that when an option is selected, it automatically goes to a particular link. How do i put links into this code? Thanks! <select name="select" size="1" id="select"> <option selected>Select an Option</option> <option>Option 1 </option> <option>Option 2</option> <option>Option 3</option> </select>

Link to comment
Share on other sites

Put the URL in the option value and write the code as follows:

<select onchange="location.href=this.value" size="1"><option selected="selected">Select an Option</option><option value="http://www.google.com">Google</option><option value="http://www.yahoo.com">Yahoo!</option><option value="http://www.w3schools.com">W3Schools</option></select>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...