Code 1: The most commonly used code, relatively simple
Copy Code code as follows:
<script language= "JavaScript" >
Self.moveto (0,0)
Self.resizeto (Screen.availwidth,screen.availheight)
</script>
Code 2:
The following code is placed between
Copy Code code as follows:
<script language=″javascript″>
<!--function Winfix () {
if (document. Layers) {
width=screen.availwidth-10;
height=screen.availheight-20;
} else {
var width=screen.availwidth-2;
var height=screen.availheight;
}
Self.resizeto (width, height);
Self.moveto (0, 0);
}
-->
</script>
The following code is placed in the <body>tag:
Copy Code code as follows:
<body Onload=″winfix () ″>
Code 3:
The code is as follows:
Copy Code code as follows:
<script language= "JavaScript" >
Self.moveto (0,0)
Self.resizeto (Screen.availwidth,screen.availheight)
</script>
<object id= "Max" type= "Application/x-oleobject" classid= "clsid:adb880a6-d8ff-11cf-9377-"
00aa003b7a11 ">
<param name= "Command" value= "Maximize" ></OBJECT>
<body onload= "if (document.body.offsetwidth<screen.width) max. Click () >>
Code 4:
Copy Code code as follows:
<SCRIPT>
var mywidth
if (navigator.appName.indexOf (' Netscape ')!=-1) {
Mywidth=parseint (Window.outerwidth)-28;
Alert ("ns")
}
else{
if (navigator.appName.indexOf (' Microsoft ')!=-1) {
Mywidth=document.body.clientwidth;
Alert ("IE")
}
}
var Screenoffset;
if (mywidth <= 778) {
Alert ("1")
}else{
Screenoffset = parseint ((mywidth-778)/2);
Screenoffset = 0;
Alert ("2")
}
Fwloadmenus ();
Window.onresize = function () {
if (navigator.appName.indexOf (' Netscape ')!=-1) {
Mywidth=parseint (Window.outerwidth)-28;
if (self.screenleft>0) {
Maximize. Click ();
}
}
else{
if (navigator.appName.indexOf (' Microsoft ')!=-1) {
Mywidth=document.body.clientwidth;
if (self.screenleft>0) {
Maximize. Click ();
}
}
}
}
function Changelocation () {
var size = Screen.width;
if (size!= "1024") {
Document.location= "Index_800_600.aspx";
}
}
</SCRIPT>