How to move and resize the browser's window in Opera and Chrome?

被刻印的时光 ゝ 提交于 2020-01-11 09:59:54

问题


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:


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



来源:https://stackoverflow.com/questions/3884116/how-to-move-and-resize-the-browsers-window-in-opera-and-chrome

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!