`
lbyzx123
  • 浏览: 482899 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

浏览器最大化问题

 
阅读更多

方式一

 

1、js

<SCRIPT LANGUAGE="javascript">
function winSizer(){
windowWidth = window.screen.availWidth;
windowHeight = window.screen.availHeight;
window.moveTo(0,0);
window.resizeTo(windowWidth,windowHeight);
}
</SCRIPT>

2、在body中调用js
<body onLoad="winSizer()">
</body>

 

方式二

 

<body   onload= "window.open( ' ', 'max ', 'top=0,left=0,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width= '+(screen.width-10)+ ',height= '+(screen.availheight-30)) ">
</body>

 

 

方式三

 

<script>
function   tofull(){
var   file   =self.location;
var   a   =  

window.open( 'about:blank ', ' ', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=

no,resizable=yes ') ;
self.opener=null ;
self.close() ;
a.focus();
a.location=file;
}
</script>

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics