软件下载 | 资讯教程 | 最近更新 | 下载排行 | 一键转帖 | 发布投稿
您的位置:最火下载站 > Web前端 > 工具与技巧 > Web 开发点滴:浏览器最大化

Web 开发点滴:浏览器最大化

  烈火网(LieHuo.Net)教程 Web 开发点滴之浏览器最大化,本文转自cnblogs。

  窗口开启即最大化方法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 hWnd
hWnd = 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 ;
}
    相关阅读
    栏目导航
    推荐软件