简体   繁体   English

如何禁用弹出窗口的Firefox最大化按钮?

[英]how to disable firefox maximize button for popup window?

如何禁用弹出窗口的Firefox最大化按钮?

Dear friend, unfortunately has no way to disable the minimize and maximize buttons in Firefox, Chrome, Opera, only in IE, this script is to force the size of the browser screen, so if someone wants to expand will not. 亲爱的朋友,很遗憾,没有办法禁用Firefox,Chrome,Opera中的最小化和最大化按钮,仅在IE中禁用此脚本来强制浏览器屏幕的大小,因此如果有人要扩展则不会。 Abs 阿布斯

use javascript.... 使用javascript...。

var width = 1028;
var height = 800;
window.moveTo((screen.availWidth/2)-(width/2),(screen.availHeight/2)-(height/2)) 
window.resizeTo(width,height);

window.onresize = function() {window.resizeTo(width,height); } 

\\o/ \\ O /

You can use the attribute 您可以使用属性

resizable 可调整大小

to be false to prevent the resizing of the new window. 为假,以防止调整新窗口的大小。

window.open("http://www.domainname.ext/yourfile","windowname","resizable=no");

Read more here 在这里阅读更多

window.open window.open

You can flag a popup as non-resizeable like this: 您可以像这样将弹出窗口标记为不可调整大小:

window.open('http://example.com/', 'popUpWindow', 'width=400,height=150, resizable=no ,scrollbars=yes'); window.open('http://example.com/', 'popUpWindow', 'width=400,height=150, resizable=no ,scrollbars=yes');

打开窗口时,使用resizable = no或resizable = 0

window.open("sample.aspx", "samplename", "resizable=no");

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM