There are two ways to make a list of links using the <select> tag. Here they are:
This will make the links in a drop-down form:
<script>
<!--
function goto(choose){
var selected=choose.options[choose.selectedIndex].value;
if(selected != ""){
location.href=selected;
}
}
//-->
</script>
<SELECT onChange="goto(this);">
<option value="">--Jump to a page--</option>
<option value="page1.html">Page 1</option>
<option value="page2.html">Page 2</option>
<option value="page3.html">Page 3</option>
</SELECT>
This example will make the links in list form:
<script>
<!--
function goto(choose){
var selected=choose.options[choose.selectedIndex].value;
if(selected != ""){
location.href=selected;
}
}
//-->
</script>
<SELECT onChange="goto(this);">
<option value="">--Jump to a page--</option>
<option value="page1.html">Page 1</option>
<option value="page2.html">Page 2</option>
<option value="page3.html">Page 3</option>
</SELECT>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.