页面跳转在firefox下的的问题
做了一个下拉列表,选择一个就会跳转到相应的页面,在IE下面是可以的,但是在firefox下面就没有反应了,想让大家帮我看看应该怎么修改
javascript代码如下:
function gotoUrl()
{
var name = document.getElementById('itemtype').value;
switch(name)
{
case '0':
window.location = "efttools.html";
break;
case '1':
window.location = "findproduct.php";
break;
case '2':
window.location = "findworkshop.php";
break;
default:
alert("name error!");
}
}
页面代码:
<select name="itemtype" onchange="gotoUrl()" >
<option value="0">Please choose a item</option>
<option value="1">Tools/DVDs/Books/Audio/etc</option>
<option value="2">Workshops/Events/Training/Certification/etc</option>
</select>
谢谢了!!
------解决方案--------------------window.location.href = "efttools.html";