请教一个JavaScript的问题10分
各位高手,小弟现在遇到一个问题如下:
<select name="<%=layer1(i)%>" size="1" onChange="redirect('<%=layer2(i)%>',this.options.selectedIndex)" style="WIDTH: 120px">
<option selected value="">请选择类别</option>
<option value="QGDX">待机动画</option>
<option value="WXHK">无线贺卡</option>
<option value="YMGS">幽默故事</option>
<option value="KJDH">开机动画</option>
<option value="BJCT">背景彩图</option>
</select>
上面有一个redirect函数。这个函数的描述如下:
function redirect(n,x){
var temp=document.isc.n
//alert(temp);
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)
}
我现在想要达到的目的是要把如何把n这个从那边带过来的变量用到document.isc中。(其中isc是form的name,n是变量想要表示的是Select的name.因为Select的name 是在变的。)
我遇到问题:我不知道该如何表示document.isc.n。我如果写成document.isc.+n+的话系统告诉我说是“缺少对象”请教各位高手!!