使窗口在Chrome中不能调整大小 [英] Make window not resizable in Chrome

查看:608
本文介绍了使窗口在Chrome中不能调整大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了一些JavaScript来创建不可调整大小的窗口,如下所示:

  window.open (URL,id,resizable = no); 

这适用于大多数浏览器,但它似乎在Chrome中不受支持。我曾考虑过使用JavaScript来观察重新调整大小并将其设置回来,但这并不理想。有没有人有任何其他建议?提前致谢。

解决方案

这是老派的javascript。现代浏览器往往不会允许这样做,因为它被视为用户不友好的限制。

I have some JavaScript that I use to make a window not resizable, something along the lines of:

window.open(URL, id, "resizable=no");

This works in most browsers but it appears to not be supported in Chrome. I have considered using JavaScript to watch for a re-size and set it back, but this is not ideal. Does anyone have any other suggestions? Thanks in advance.

解决方案

This is old school javascript. Modern browsers tend to not allow this because it is seen as a user unfriendly limitation.

这篇关于使窗口在Chrome中不能调整大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆