js maximize the browser window (Method for IE)

The method used here is private IE characteristics, effective only in IE. Mainly window.moveTo and window.resizeTo method.
  
   Click the maximize button effects and almost, a little different. Click the maximize button, the contents of the browser display filled up, the border of the browser window being squeezed display. Js and maximize the effect of the browser is displayed in the display frame.
 
    js code as follows:
   function resizeWindow(){
    if (window.screen) {// determine whether the browser supports window.screen determine whether the browser supports screen     
      var myw = screen.availWidth; // define a myw, receives the current full-screen width     
      var myh = screen.availHeight; // define a myw, receives high current full-screen     
      window.moveTo (0, 0); // the window in the upper left corner     
      window.resizeTo (myw, myh); // length and width of the current window and jump to MYW MYH     
    } 
   }
 
html use the body onload event to call this function:
<body οnlοad="resizeWindow();">

Guess you like

Origin www.cnblogs.com/bdqczhl/p/11243551.html