HTML and CSS Reference
In-Depth Information
<! DOCTYPE HTML >
< html >
< head >
< script type = ”text/javascript” src = ”globMenu.js” />
< meta http - equiv = ”Content-Type” content = ”text/html; charset=UTF-8” >
< title > Drop - Down Menu </ title >
</ head >
< body >
< article >
< header >
< nav >
< form name = ”menuNow” >
< label for = ”animals” > Animals </ label >
< select id = ”animals” name = ”global1” onChange = ”optionMenu()” >
< option value = ”animals/horses.html” > Horses </ option >
< option value = ”animals/dogs.html” > Dogs </ option >
< option value = ”animals/cats.html” > Cats </ option >
< option value = ”animals/rabbits.html” > Rabbits </ option >
< option value = ”animals/raccoons.html” > Raccoons </ option >
</ select >
< label for = ”vegetables” > Vegetables </ label >
< select id = ”vegetables” name = ”global2” >
< option value = ”carrots” > Carrots </ option >
< option value = ”squash” > Squash </ option >
< option value = ”peas” > Peas </ option >
< option value = ”rice” > Rice </ option >
< option value = ”potatoes” > Potatoes </ option >
</ select >
< label for = ”minerals” > Minerals </ label >
< select id = ”minerals” name = ”global3” >
< option value = ”tin” > Tin </ option >
< option value = ”gold” > Gold </ option >
< option value = ”copper” > Copper </ option >
< option value = ”iron” > Iron </ option >
< option value = ”mercury” > Mercury </ option >
</ select >
</ form >
</ nav >
</ header >
</ article >
</ body >
</ html >
158
Test the page using with Google Chrome or Opera — at the time of this writing, those were
the only two browsers that had implemented this aspect of HTML5.
For the time being, you won't be doing anything with the second two drop-down menus, but
at the end of the chapter you'll be given an opportunity to complete them with a few additions
to the JavaScript i le.
 
Search WWH ::




Custom Search