javascript - How to move and resize the browser's window in Opera and Chrome? - Stack Overflow

I was looking for a way to resize and move the browser's window and I've found these:self.re

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.

Share Improve this question edited Jun 12, 2011 at 14:02 rhino asked Oct 7, 2010 at 17:17 rhinorhino 14k9 gold badges39 silver badges40 bronze badges 1
  • 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
Add a ment  | 

1 Answer 1

Reset to default 3

In 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).

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745322570a4622508.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信