admin管理员组文章数量:1356808
i'm trying to open popup window this this jscript: window.open(myUrl, ""); for some users the page appears in a new tab, but I want it in a popup window. maybe someone know any reason for it?
i'm trying to open popup window this this jscript: window.open(myUrl, ""); for some users the page appears in a new tab, but I want it in a popup window. maybe someone know any reason for it?
Share Improve this question asked May 25, 2010 at 11:05 questionquestion 311 silver badge5 bronze badges 1- Any site which resizes my window or pops another window gets closed and never revisited. – wombleton Commented May 25, 2010 at 13:23
2 Answers
Reset to default 5For the most part, this is a configuration setting in most modern browsers that the user controls. However, if you specify window dimensions and/or features on the window.open
call, some browsers may open a new window when they otherwise would have opened a new tab. For example:
window.open("mypage", "_blank", "width=400,height=200,menubar=no,toolbar=no");
At the end of the day, though, it's stil down to the browser implementation, and as ever, you'll need to test to ensure you're getting the results you hope for across the majority of browsers your app/site supports/typically sees.
This article might be of help: http://www.blazonry./javascript/windows.php. You need to specify size attributes.
window.open(myUrl, "_blank", "width=640,height=480,menubar=no,toolbar=no");
本文标签: javascriptwindowopen open the page in a new tab instead of in popup windowStack Overflow
版权声明:本文标题:javascript - window.open open the page in a new tab instead of in popup window - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744072119a2586080.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论