Project I: JavaScript and Pull-Down Menus—Getting to Where You Want to Go!
The first thing we need to do is insert the HTML code into the secondary navigation that will give us our pull-down menu and Go button. Here is the code that we will use.
<select name="PullDown"> <option value=" ">Get There Quick <option value=" ">What's New <option value=" ">Featured Product <option value=" ">Press Releases <option value=" ">Company Store </select> <input type="button" name="Go" value="Go">
Because we will be inserting the pull-down into a preexisting design, we will place the <FORM> tag, which will be named NavForm, at the beginning and end of the HTML body instead of directly around the form element to prevent any unwanted line breaks or spaces. You ...
Get Essential JavaScript™ for Web Professionals, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.