【发布时间】:2013-02-02 10:24:36
【问题描述】:
我在打开新窗口选项卡到外部网站时遇到一些浏览器问题。
它应该做什么:当前窗口被重定向到一个页面,同时它打开一个新的窗口选项卡并被重定向到一个外部页面。
它在 Firefox 上运行良好,但不支持 IE 或 Chrome,因为它不会打开新窗口选项卡并重定向。但是,它确实可以在当前窗口上很好地重定向到我想要的页面。有人知道为什么吗?
<script type="text/javascript">window.open('Site A');</script> (This doesn't open in IE, and Chrome open in a new window instead of tab)
<script>top.location.href="Site B"</script> (This line works fine in FF, IE, and Chrome)
<script type="text/javascript">
【问题讨论】:
标签: javascript internet-explorer google-chrome firefox