JS enables the browser window to maximize implementation code (for IE) _javascript tips
Source: Internet
Author: User
The method used here is the private nature of IE, which is only valid in IE. Mainly the Window.moveto and Window.resizeto methods.
The effect is almost the same as clicking the Maximize button, a little different. After clicking the Maximize button, the contents of the browser fill the display, and the border of the browser window is extruded. The maximum effect of this JS is that the browser's border is displayed inside the monitor.
The JS code is as follows: function Resizewindow () {
if (Window.screen) {//Determine whether the browser supports Window.screen to determine whether the browser supports screen var myw = screen.availwidth;//define a MYW, accept the wide var myh = sc for the current Full-screen Reen.availheight; Defines a myw that receives the current full screen of the high Window.moveto (0, 0); Place window on left top foot Window.resizeto (Myw, MYH); Convert the current form's height-to-width jump to Myw and MYH}}
The body of HTML uses the OnLoad event to invoke the function:
<body onload= "Resizewindow ();" >
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