<!--
var str = "left=0,screenX=0,top=0,screenY=0,fullscreen=yes";//fullscreen=yes只对IE有效! if (window.screen) {
var ah = s">

Javascript实现窗口最大化的严格定义

80酷酷网    80kuku.com

  javascript|最大化

<SCRIPT LANGUAGE="JavaScript">
<!--
var str = "left=0,screenX=0,top=0,screenY=0,fullscreen=yes";//fullscreen=yes只对IE有效!

if (window.screen) {
var ah = screen.availHeight - 30;
var aw = screen.availWidth - 10;
str += ",height=" + ah;
str += ",innerHeight=" + ah;
str += ",width=" + aw;
str += ",innerWidth=" + aw;
} else {
str += ",resizable"; // 对于不支持screen属性的浏览器,可以手工进行最大化。 manually
}

function launchFull(url, name) {
return window.open(url, name, str);
}

var win = launchFull("", "full");

// -->
</SCRIPT>















分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: