Javascript Redirect location.href不';我不能在Internet Explorer中工作

Javascript Redirect location.href不';我不能在Internet Explorer中工作,javascript,Javascript,我基于javascript的重定向代码在mozilla和chrome上运行良好,但是 在internet explorer中,它不起作用。此处代码: JS: <select onchange="redirecttooperator(this);"> <option value="location">GO 1</option>"; </select> function redirecttooperator(select){ var oper

我基于javascript的重定向代码在mozilla和chrome上运行良好,但是 在internet explorer中,它不起作用。此处代码:

JS:

<select onchange="redirecttooperator(this);">
<option value="location">GO 1</option>";
</select>
function redirecttooperator(select){
    var operator = select.options[select.selectedIndex].value;
        window.location.href = operator;
}

使用window.location而不是location.href

 window.location='http://google.com';
HTML:


世界卫生组织标志-1的可能重复点指向我的问题。我对他说了坏话。为什么-1?是的,你的问题显示出研究的严重不足,这就是为什么我投了反对票。请不要再说你的坏话了,互联网已经够多了。这也不是你第一个让选票下降的问题。在提问之前,您需要更积极地提高问题质量,并进行基础研究。这不受支持,请参阅重复的问题尝试和internet explorer显示浏览器控制台上的脚本块internet explorer不支持onclick for option tag?谢谢您的方法有效我编辑了它。我从很多if()语句中将位置写入值并保存函数。
 window.location='http://google.com';
<select onchange="selectChanged();" id="select">
<option>GO</option>
</select>
function selectChanged() {
    var slct = document.getElementById("select");
    var slcted = slct.options[e.selectedIndex].value;
    if(slcted == "GO") {
        window.location.href = "location";
    }
}