关于三级联动的问题,菜鸟求教!
<FORM name="isc"> <table border="0" cellspacing="0" cellpadding="0">
<tr align="center">
<td nowrap height="11">
<select name="example" size="1" onChange="redirect(this.options.selectedIndex)">
<option selected>--请选择--</option>
<option>05级</option>
<option>06级</option>
<option>07级</option>
</select>
<select name="stage2" size="1" onChange="redirect1(this.options.selectedIndex)">
<option value=" " selected> </option>
<option value=" " selected></option>
<option value=" " selected></option>
</select>
<select name="stage3" size="1" onChange="redirect2(this.options.selectedIndex)">
<option value=" " selected> </option>
<option value=" " selected></option>
<option value=" " selected></option>
</select>
<script>
var groups=document.isc.example.options.length
var group=new Array(groups)
for (i=0; i<groups; i++)
group[i]=new Array()
group[0][0]=new Option("--请选择--"," ");
group[1][0]=new Option("计算机系"," ");
group[1][1]=new Option("经济系","47");
group[1][2]=new Option("应用语言系","46");
group[1][3]=new Option("艺术系","45");
group[2][0]=new Option("计算机系"," ");
group[2][1]=new Option("经济系","115");
group[2][2]=new Option("应用语言系","116");
group[2][3]=new option("艺术系","117");
group[3][0]=new option("计算机系","");
group[3][1]=new option("经济系","47");
group[3][2]=new option("应用语言系","46");
group[3][3]=new option("艺术系","45");
var temp=document.isc.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
redirect1(0)
}
var secondGroups=document.isc.stage2.options.length
var secondGroup=new Array(groups)
for (i=0; i<groups; i++) {
secondGroup[i]=new Array(group[i].length)
for (j=0; j<group[i].length; j++) {
secondGroup[i][j]=new Array() }}
secondGroup[0][0][0]=new Option("--请选择--"," ");
secondGroup[1][0][0]=new Option("--请选择--"," ");
secondGroup[1][1][0]=new Option("--请选择--"," ");
secondGroup[1][1][1]=new Option("信息管理","http://);
secondGroup[1][1][2]=new Option("软件应用","http://);
secondGroup[1][1][3]=new Option("多媒体技术","http://);
secondGroup[1][2][0]=new Option("--请选择--"," ");
secondGroup[1][2][1]=new Option("市场营销","http://www.);
secondGroup[1][2][2]=new Option("国际贸易","http://www.);
secondGroup[1][2][3]=new Option("会计","http://);
secondGroup[1][3][0]=new Option("--请选择--"," ");
secondGroup[1][3][1]=new Option("商务英语","http://www.);
secondGroup[1][3][2]=new Option("旅游英语","http://adashimar.);
secondGroup[1][4][0]=new Option("--请选择--","");
secondGroup[1][4][1]=new Option("艺术设计","http://adashimar. ");
secondGroup[2][0][0]=new Option("--请选择--"," ");
secondGroup[2][1][0]=new Option("--请选择--"," ");
secondGroup[2][1][1]=new Option("信息管理","http://);
secondGroup[2][1][2]=new Option("软件应用","http://www.);
secondGroup[2][1][3]=new Option("多媒体技术","http://www.);
secondGroup[2][2][0]=new Option("--请选择--"," ");
secondGroup[2][2][1]=new Option("市场营销","http://www.);
secondGroup[2][2][2]=new Option("国际贸易","http://www.);
secondGroup[2][2][3]=new Option("会计","http://www.);
secondGroup[2][3][0]=new Option("--请选择--","http://www.);
secondGroup[2][3][1]=new Option("商务英语","http://www.);
secondGroup[2][3][2]=new Option("旅游英语","http://www.);
secondGroup[2][4][0]=new Option("--请选择--","http://www.);
secondGroup[2][4][1]=new Option("艺术设计","http://www.);
secondGroup[3][0][0]=new Option("--请选择--","");
secondGroup[3][1][0]=new Option("--请选择--","");
secondGroup[3][1][1]=new Option("信息管理","");
secondGroup[3][1][2]=new Option("软件应用","");
secondGroup[3][1][3]=new Option("多媒体技术","");
secondGroup[3][2][0]=new Option("--请选择--","");
secondGroup[3][2][1]=new Option("市场营销","");
secondGroup[3][2][2]=new Option("软件应用","");
secondGroup[3][2][3]=new Option("多媒体技术","");
secondGroup[3][3][0]=new Option("--请选择--","");
secondGroup[3][3][1]=new Option("商务英语","");
secondGroup[3][3][2]=new Option("旅游英语","");
secondGroup[3][4][0]=new Option("--请选择--","");
secondGroup[3][4][1]=new Option("艺术设计","");
var temp1=document.isc.stage3
function redirect1(y){
for (m=temp1.options.length-1;m>0;m--)
temp1.options[m]=null
for (i=0;i<secondGroup[document.isc.example.options.selectedIndex][y].length;i++){
temp1.options[i]=new Option(secondGroup[document.isc.example.options.selectedIndex][y][i].text,secondGroup[document.isc.example.options.selectedIndex][y][i].value)
}
temp1.options[0].selected=true
}
function redirect2(z){
window.location=temp1[z].value
}
</script>
</td>
</tr>
</table>
</FORM>
这段代码有什么问题???代码是网上找来的,修改过Group那一段,但是用不了,请各位高手来帮帮忙啊~~~~~小弟不胜感激~~