Redirect onclick
window.location = menu.options[menu.selectedIndex].value;
-
menu.options[]
an array of the options for the selection list
-
menu.selectedIndex
the index position of the option selected (0 = first option, 1 = second option, etc.)
-
.value
value of the "value" attribute
-
window.location
Example
8.3 Source:
In
script element (within
head element):