Opera 中的 Window.open 打开选项卡而不是弹出窗口?
我只是从 JavaScript 打开一个弹出窗口,其中包含您可以在代码中看到的设置。在 Firefox 中运行良好。在 Opera 中,它会在新选项卡中打开它。为什么?
这是一个 JSFiddle: http://jsfiddle.net/hafWs/3/
参数的数量似乎并没有使有区别。可以在 Firefox 和 IE8 中工作。 (现在没有 IE9 或 Chrome 来测试。)
我尝试谷歌搜索...找不到任何东西。我什至没有在这里看到任何提到它的内容,但它在他们的示例中显然有效: http:// /www.quirksmode.org/js/popup.html
感谢您的帮助。
I'm simply opening a popup from JavaScript with the settings you can see in the code. Works fine in Firefox. In Opera it's opening it in a new tab instead. Why?
Here's a JSFiddle:
http://jsfiddle.net/hafWs/3/
The number of parameters doesn't seem to make a difference. Either work in Firefox and IE8. (Don't have IE9 or Chrome to test right now.)
I tried googling... can't find anything. I don't even see anything here that mentions it, yet it's clearly working in their examples: http://www.quirksmode.org/js/popup.html
Thank you for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
选项参数中的空格存在问题:
它仍然是一个选项卡,但尺寸不同。所以,它看起来有点像弹出窗口。
There is problem with spaces in options param:
It is still a tab, but with different dimensions. So, it looks kinda as popup.
这是由浏览器本身(首选项)控制的,无法通过 JavaScript 进行更改。
注意:我看到一些帖子说您可以根据传递给 window.open 函数的参数确定窗口是在选项卡中打开还是作为新窗口打开。我从未见过这项工作始终如一。
This is controlled by the browser itself (preferences) and cannot be changed from JavaScript.
NOTE: I've seen some posts that say you can determine whether the window opens in a tab or as a new window based on the parameters that you pass the window.open function. I have never seen this work consistently.