Page open automatically maximize the JS code _ page Background

Source: Internet
Author: User
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>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.