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

发表于:2007-06-21来源:作者:点击数: 标签:
SCRIPT LANGUAGE=" Java Script" !-- 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

   

<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("http://www.webjx.com", "full");


// -->
</SCRIPT>

原文转自:http://www.ltesting.net