Code 1: The most common code, relatively simple
The Code is as follows:
<Script language = "javascript">
Self. moveto (0, 0)
Self. resizeto (screen. availwidth, screen. availheight)
</Script>
Code 2:
Run the following code between The Code is 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>
Run the following code in the <body> Tag:
The Code is as follows:
<Body onload = "winfix ()">
Code 3:
The Code is 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:
The Code is 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! = & Quot; 1024 & quot "){
Document. location = "index_800_600.aspx ";
}
}
</SCRIPT>