![]() |
|
首页 │ Apache │ Linux│ Java│ MySQL│ 注册│帮助 | |||
相关问题
当选了1系列的后,再选2系列,那在第二级那里也会出现1系列的东西。
[php]
<script language="javascript">
//获取一级菜单长度
var select1_len = document.frm.s1.options.length;
var select2 = new Array(select1_len);
//把一级菜单都设为数组
for (i=0; i
select2 = new Array();
}
//定义基本选项
select2[0][0] = new Option("请选择第一级", " ");
select2[1][0]=new Option("1-1系列","1");
select2[1][1]=new Option("1-2系列","2");
select2[1][2]=new Option("1-3系列","3");
select2[1][3]=new Option("1-4系列","4");
select2[1][4]=new Option("1-5系列","5");
select2[1][5]=new Option("1-6系列","6");
select2[2][0]=new Option("2-1系列","7");
select2[2][1]=new Option("2-2系列","8");
select2[2][2]=new Option("2-3系列","9");
select2[3][0]=new Option("3-1系列","10");
select2[3][1]=new Option("3-2系列","11");
select2[3][2]=new Option("3-3系列","12");
select2[3][3]=new Option("3-4系列","13");
select2[4][0]=new Option("4-1系列","14");
select2[5][0]=new Option("5-1系列","15");
select2[5][1]=new Option("5-2系列","16");
select2[5][2]=new Option("5-3系列","17");
select2[6][0]=new Option("6-1系列","18");
select2[6][1]=new Option("6-2系列","19");
select2[6][2]=new Option("6-3系列","20");
select2[6][3]=new Option("6-4系列","21");
//联动函数
function redirec(x)
{
var temp = document.frm.s2;
for (i=0;i
temp.options=new Option(select2[x].text,select2[x].value);
}
temp.options[0].selected=true;
}
</script>
[/php]
提问者:zww23 08-22 08:08
答复

