以100%的宽度和高度打开IE的代码? [英] Code to open IE at 100% width and height?

查看:85
本文介绍了以100%的宽度和高度打开IE的代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!



我正在为我所在的学校创建一个员工内部网页面。完全最大化(非全屏模式)时,页面效果最佳。然而,学校里的一些电脑开放的宽度和高度都是40%。我只是想知道是否还有强制窗口100%的宽度和高度?



谢谢,



尼克

解决方案

< blockquote>

 <   script     language   =  JavaScript >  
window.onload = maxWindow;

函数maxWindow()
{
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 >


Hi!

I am creating a staff intranet page for the school I work at. The page works best when it is fully maximised (not full screen mode). However some PC's in the school open at like 40% width and height. I was just wondering if there was anyway to force the window to 100% width and height?

Thanks,

Nick

解决方案

<script language="JavaScript">
window.onload = maxWindow;

function maxWindow()
{
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>


这篇关于以100%的宽度和高度打开IE的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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