页面自动最大化问题
所以,这段代码用于在加载时自动最大化页面,但它在 Firefox 更新之前可以正常工作,现在它在 IE 中工作正常,但在 FF 中不再执行任何操作...任何如何修复它的建议,或者如果您有一些工作脚本那就太好了!
<script language="JavaScript1.2">
top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById) {
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
</script>
So, this code is for auto maximizing page when it is loading BUT it was working before firefox update, NOW it is working fine in IE but it does not do anything in FF anymore... any suggestions how to fix it, or if you have some working script it will be great!
<script language="JavaScript1.2">
top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById) {
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
</script>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是最新更新中的新“修复”。请参阅此处:
错误 565541 - 不允许网站调整主窗口大小
它阻止网页运行代码来调整窗口大小。已经有很多人抱怨这会禁用一个有用的功能。
This is a new "fix" in the latest update. See here:
Bug 565541 - Web sites shouldn't be allowed to resize main window
It prevents web pages running code to resize the window. There have already been a lot of complaints that this disables a useful feature.