- Skill level:
Other People Are Reading
Open your web page and view its code. If you use a text editor, simply open your page in the editor and select the line of code where you want the drop-down menu added. If you use a visual web editor instead (for example Adobe Dreamweaver or Microsoft Expression Web), open your page and click on the page location where you want the drop-down menu to appear. After doing so, change your viewing mode to Code View. This shows you the HTML code that determines the content and appearance of your page.
Press the "Enter" key to create a blank line.
Copy and paste the following code onto the blank line:
<form name="link"> <select name="menu"> <option selected>Select your link</option> <option value="http://www.sample.com/">Sample website 1</option> <option value="http://www.sample.com/">Sample website 2</option> <option value="http://www.sample.com/">Sample website 3</option> </select> <input type="button" onClick="location=document.link.menu.options[document.link.menu.selectedIndex].value;" value="Go"> </form>
Update the link parameters to meet your design needs. Enter the default text at the top of the list by modifying the value directly after the <option selected> tag; change the URL of each subsequent item by adjusting the corresponding value parameter; and replace the "Sample website" text with your desired link text. You can also replace the text contained in the value parameter of the <input> tag to update the text that appears on the "Submit" button.
Save your web page and then open it in your browser. Select an option from the drop-down list and then click the adjacent button to access the selected item.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for