backt next

Drop Down Menu


With some help from JavaScript, selection list can be very useful.You can use <select> lists to go to selected url when click on.


Select your destination here:



To understand what is going on, take a look at how the link is coded.

<form name="m1">
<select name="m2" size="1">
<option value="../index.html" selected>Home</option>
<option value="../html/index.html">HTML Tutorials</option>
<option value="../freewp/index.html">Free Webpage</option>
<option value="../resources/index.html">Resources</option>
</select>
<input type="button" value="GO" onClick= "window.location=document.m1.m2.options[document.m1.m2.selectedIndex].value">
</form>


To access anything within selection list, I would write:
documnt.form's name.select's name



Back to JavaScript homepage | Back | Next | Email me