在JavaScript中跨浏览器调整大小的浏览器窗口

在JavaScript中跨浏览器调整大小的浏览器窗口

问题描述:

我希望能够用JavaScript来调整浏览器窗口。我不想使用jQuery,较小的code中的好,但在所有的主流浏览器包括Chrome工作。

I would like to be able to resize the browser window with JavaScript. I don't want to use jQuery, and the smaller the code the better, but it has to work in all of the major browsers including Chrome.

任何解决方案?

感谢您的帮助!

P.S。这个问题被打上了标签应合并,但我不知道怎么办。

P.S. The tags that this question was tagged with should be combined but I don't know how.

浏览器-----------一样 - > web浏览器

browser -----------same as--> webbrowser

跨浏览器----一样 - >浏览器兼容性

cross-browser----same as--> browser compatibility

window.resizeTo(宽度,高度); 一>

您可能面临的问题是现代浏览器都可以prevent您在设置无法调整窗口大小。周围有没有办法。

The problem you may face is modern day browsers can prevent you in the settings to not be able to resize the window. There is no way around that.

Chrome浏览器不会允许它。 不会修复的Bug

Chrome will not allow it. Won't Fix Bug

IE是基于安全区域