窗口开启即全屏、最大化的几种方法

来源:互联网 发布:网络中介交易平台 编辑:程序博客网 时间:2024/05/17 04:25

窗口开启即最大化方法1:

<body onload="moveTo(0,0);resizeTo(screen.Width,screen.Height);resizeTo(screen.Width+screenLeft*2,screen.Height+(screen.Height-document.body.offsetHeight));moveTo(-screenLeft,-screenTop)" scroll="no" style="border:0">abc<center style="padding:200px"><input type="button" name="bb" value="close me" onclick="window.close()"/></center>
窗口开启即最大化方法2:
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="border:0" onload="moveTo(0,0);resizeTo(screen.availWidth,screen.availHeight);resizeTo(screen.availWidth+screenLeft*2,screen.availHeight+(screen.availHeight-document.body.offsetHeight));moveTo(-screenLeft,-screenTop)" scroll="no">
开启即最大化:
<object id=maximize type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"><param name="Command" value="MAXIMIZE"></object><script language="javascript">if(self.screenLeft>1){maximize.Click();}self.focus();</script>

开启后弹出窗口最大化:

<script><!--var newwin=window.open("./","","scrollbars");newwin.moveTo(0,0)newwin.resizeTo(window.screen.availWidth,window.screen.availHeight)//--></script>

调用代码使打开窗口最大化:function openWin(){var hWndhWnd = window.open('index.html','AceCRMForSale','height='+ new String(screen.availHeight-28) + ',top=0,left=0,width=' + new String(screen.availWidth-10) + ',location=no,menubar=no,resizable=no,toolbar=no'); return hWnd ;}
原创粉丝点击