Home >Web Front-end >JS Tutorial >The js code that automatically maximizes the web page when opening it_page background

The js code that automatically maximizes the web page when opening it_page background

WBOY
WBOYOriginal
2016-05-16 17:50:371037browse
Code 1: The most commonly used code, relatively simple
Copy code The code is as follows:



Code 2:
The following code is placed between :
Copy the code The code is as follows:



The following code is placed in the Tag:
Copy code The code is as follows:



Code 3:
The code is as follows:
Copy code The code is as follows:




>

Code 4:
Copy code The code is as follows:

<SCRIPT> <br>var mywidth <br>if (navigator.appName.indexOf ('Netscape') != -1) { <br>mywidth=parseInt(window.outerWidth)-28; <br>//alert("ns") <br>} <br>else{ <br>if ( navigator.appName.indexOf('Microsoft') != -1) { <br>mywidth=document.body.clientWidth; <br>//alert("ie") <br>} <br>} <br>var ScreenOffset; <br>if (mywidth <= 778) { <BR>//alert("1") <BR>}else{ <BR>ScreenOffset = parseInt((mywidth - 778)/2); <BR> ScreenOffset = 0; <BR>// alert("2") <BR>} <BR>fwLoadMenus(); <BR>window.onresize = function (){ <BR>if (navigator.appName.indexOf('Netscape ') != -1) { <BR>mywidth=parseInt(window.outerWidth)-28; <BR>if(self.screenLeft>0){ <br>maximize.Click(); <br>} <br> } <br>else{ <br>if (navigator.appName.indexOf('Microsoft') != -1) { <br>mywidth=document.body.clientWidth; <br>if(self.screenLeft>0){ <br>maximize.Click(); <br>} <br>} <br>} <br>} <br>function ChangeLocation(){ <br>var size = screen.width; <br>if(size! ="1024"){ <br>document.location="index_800_600.aspx"; <br>} <br>} <br></SCRIPT>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn