双重导航菜单代码分享
脚本说明:
把如下代码加入<body>区域中
<FORM name=doublecombo>
<P align=center><SELECT name=example
onchange=redirect(this.options.selectedIndex) size=1> <OPTION
selected>」JavaScript2000」</OPTION> <OPTION>」动画图库」</OPTION>
<OPTION>」风景区」</OPTION></SELECT> <SELECT name=stage2 size=1> <OPTION selected
value=allspcer.htm>」Java Script</OPTION> <OPTION
value=../javaapplet/index.htm>」Java Applet</OPTION> <OPTION
value=../cgi/index.htm>」C G I</OPTION> <OPTION
value=../explain/route.htm>」CGI相关设定</OPTION> <OPTION
value=../free.htm>」免费资源</OPTION> <OPTION value=../hotel.htm>」饭店资料</OPTION>
<OPTION value=mailto:webmaster@javascript2000.com>」E-Mail</OPTION></SELECT> <INPUT name=test onclick=go() type=button value=Go!>
<SCRIPT language=JavaScript>
<!--
var groups=document.doublecombo.example.options.length
var group=new Array(groups)
for (i=0; i<groups; i++)
group[i]=new Array()
group[0][0]=new Option("」Java Script","allspcer.htm")
group[0][1]=new Option("」Java Applet","../javaapplet/index.htm")
group[0][2]=new Option("」C G I","../cgi/index.htm")
group[0][3]=new Option("」CGI相关设定","../explain/route.htm")
group[0][4]=new Option("」免费资源","http://tmscsy.sinaapp.com/")
group[0][5]=new Option("」饭店资料","../hotel.htm")
group[0][6]=new Option("」E-Mail","mailto:webmaster@javascript2000.com")
group[1][0]=new Option("」分隔线","../pictures/bar/1.htm")
group[1][1]=new Option("」施工中","../pictures/work/1.htm")
group[1][2]=new Option("」HOT","../pictures/hot/1.htm")
group[1][3]=new Option("」邮件", "../pictures/email/1.htm")
group[1][4]=new Option("」插图", "../pictures/new/1.htm")
group[1][5]=new Option("」插画商标", "../pictures/icon/1.htm")
group[1][6]=new Option("」方向指标", "../pictures/arow/1.htm")
group[1][7]=new Option("」首页图片", "../pictures/home/1.htm")
group[1][8]=new Option("」前面标题", "../pictures/start/1.htm")
group[1][9]=new Option("」卡通人物", "../pictures/cartoon/1.htm")
group[1][10]=new Option("」欢迎光临", "../pictures/welcome/1.htm")
group[1][11]=new Option("」动物", "../pictures/animal/1.htm")
group[2][0]=new Option("」天后宫","../island/temple.htm")
group[2][1]=new Option("」天安门","../island/battery.htm")
group[2][2]=new Option("」天坛","../island/lighthouse.htm")
group[2][3]=new Option("」北海公园","../island/seapark.htm")
var temp=document.doublecombo.stage2
function redirect(x){
for (m=temp.options.length-1;m>0;m--)
temp.options[m]=null
for (i=0;i<group[x].length;i++){
temp.options[i]=new Option(group[x][i].text,group[x][i].value)
}
temp.options[0].selected=true
}
function go(){
location=temp.options[temp.selectedIndex].value
}
//-->
</SCRIPT></FORM>