js联动下拉菜单第二项选择后怎么样直接跳转
已知代码如下 <form name="frm">
<select onChange="redirec(document.frm.s1.options.selectedIndex)" name="s1">
<option selected="selected">请选择大类</option>
<option value="1">整车展示</option>
<option value="2">配件展示</option>
<option value="3">轮胎展示</option>
</select> <br />
<select name="s2">
<option value="请选择小类" selected="selected">请选择小类</option>
</select>
</form>
<script language="javascript">
//获取一级菜单长度
var select1_len = document.frm.s1.options.length;
var select2 = new Array(select1_len);
//把一级菜单都设为数组
for (i=0; i<select1_len; i++)
{ select2[i] = new Array();}
//定义基本选项
select2[0][0] = new Option("请选择小类", " ");
select2[1][0] = new Option("HOVA豪威矿用车", "http://www.);
select2[1][1] = new Option("HOVA带式输送车", "");
select2[1][2] = new Option("HOWO豪沃全轮驱动车(越野车)", " ");
select2[1][3] = new Option("斯太尔(王)全轮驱动车(越野车)", " ");
select2[1][4] = new Option("低速牵引车(码头车)", " ");
select2[1][5] = new Option("HOWO豪沃10X6大型运输车", " ");
select2[1][6] = new Option("四开门消防车", " ");
select2[1][7] = new Option("原木运输车", " ");
select2[1][8] = new Option("油田专用车", " ");
select2[1][9] = new Option("军用汽车", " ");
select2[1][10] = new Option("自卸车", " ");
select2[1][11] = new Option("载货车", " ");
select2[1][12] = new Option("牵引车", " ");
select2[2][0] = new Option("C/C++", " ");
select2[2][1] = new Option("Java", " ");
select2[2][2] = new Option("C#", " ");
select2[3][0] = new Option("Perl", " ");
select2[3][1] = new Option("Ruby", " ");
select2[3][2] = new Option("Python", " ");
//联动函数
function redirec(x)
{
var temp = document.frm.s2;
for (i=0;i<select2[x].length;i++)
{ temp.options[i]=new Option(select2[x][i].text,select2[x][i].value);}
temp.options[0].selected=true;
}
</script>
可是不知道选择第二项后怎样能直接跳转
select2[1][0] = new Option("HOVA豪威矿用车", "http://www.);