admin管理员组文章数量:1420128
I was looking for a way to resize and move the browser's window and I've found these:
self.resizeTo(w, h)
and self.moveTo(x, y)
- this seems to work perfectly, but only in Firefox and IE (tested with IE8, I don't know how it works in the previous versions).
How can I force the same behavior (resizing and moving) in Opera and Chrome? In these browsers the above solution does not work at all. Just nothing happens and nothing appears in the error console.
I was looking for a way to resize and move the browser's window and I've found these:
self.resizeTo(w, h)
and self.moveTo(x, y)
- this seems to work perfectly, but only in Firefox and IE (tested with IE8, I don't know how it works in the previous versions).
How can I force the same behavior (resizing and moving) in Opera and Chrome? In these browsers the above solution does not work at all. Just nothing happens and nothing appears in the error console.
- 1 Note that resize/move may be disabled even for pop-ups on Firefox. Mucking around with window positioning is widely regarded as obnoxious and blocked for this reason. – bobince Commented Oct 7, 2010 at 18:36
1 Answer
Reset to default 3In Opera and Chrome you can use window.resizeTo(w,h);
but it won't affect maximized tabs (so you can only move and resize popups).
本文标签: javascriptHow to move and resize the browser39s window in Opera and ChromeStack Overflow
版权声明:本文标题:javascript - How to move and resize the browser's window in Opera and Chrome? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745322570a2653443.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论