Summary of properties and methods of JS host Object

Source: Internet
Author: User

(1) Attribute:      //height,width;           a=document.documentElement.clientHeight;           //document visual height, determined by the browser           b= document.documentelement.scrollheight;          //Document scrollable height, Determined by document content           c=document.body.clientHeight;           //document content body height, determined by document content            d=document.documentElement.scrollTop;           //Document Scroll height, determined by the height of the move           e=windows.innerheight           //document visual height, determined by the browser            f=window.outerheight;          //the entire window height, including the menu bar, is determined by the browser                           The    //status property sets or returns the text in the window's status bar           // Many browsers have turned off the ability to script their status bar. This is a security measure to prevent hidden hyperlinks           //real-purpose phishing attacks            window.status= "HelloWorld personal blog"         //defaultstatus   Set window status bar default text            window.defaultstatus= "HelloWorld personal blog"              The  //top,parent,self,opener          //top property returns the topmost ancestor window, If the window itself is a top-level window, the top property holds a reference to the window itself. If the window is a frame, then the top property references the top-level window that contains the frame.          &nbsP;//self equivalent to window          //parent Father window     The        //opener property is useful for creating a window that can reference properties and functions defined by the window that created it.           //only the Operner property of the Window object representing the top-level window is valid, representing the frame's Window object's            //operner            function Turn () {                if (window.top=window.self) {                     window.top.location.href= "http:/ /www.baidu.com ";                }           }                    //closed Check whether the window is closed           window.closed;                      //name Sets or returns the name of the window          mywindow=window.open ('/HTTP/ Www.baidu.com ', ' MyName ', ' width=200,height=100 ');           function Checkwin ()                   {                  document.write (Mywindow.name)                   }           (2) method:           alert ();       pop-up cue box       &nbsP;   confirm ();     displays a dialog box with a message and a confirmation button and a Cancel button           prompt ();      Display a dialog box to prompt the user for input           setinterval () ; Set timer           clearinterval (); Clear Timer            settimeout ();    Set the timeout           cleartimeout (); Clear Timeout           //name window name            //features string, new window display parameters                     window.open (Url,name,features,replace): Open a new browser window or find a named window           window.close (); Close the window;           window.print (); Print the inside of the current window          window.moveby (x, y), and x, y axis moving pixels;           window.moveto (x, y), moving to (x, y);           window.scrollby (xnum,ynum); window width and height scrolling volume            window.scrollto (xpos,ypos); window scrolls to a coordinate            Window.resizeby (width,height); window Variation           window.resizeto (width,height); the window changes to a certain amount of           window.focus (); Keyboard focus gives a window or an object           window.blur (), which removes the keyboard focus from the top-level browser window, Entire window by window                           object designation. Which window eventually gets keyboard focus and does not specify   //-----------Screen Navigator document location history-----------------          //screen:Height width availheight availwidth screen.height: computer screen height screen.availheight: computer effective height (except taskbar) //navigator:Navigator.platform The default language of the OS navigator.systemlanguage OS running the browser navigator.userlanguage the natural setting language of the OS Navigator.cpuclass OS CPU level navigator.appname browser name navigator.appcodename browser code name Navigat Or.appversion Browser version navigator.appminorversion browser secondary version navigator.useragent returns the user-agent header of the server sent by the client Value //location:           //(1) .            location.host: Sets or returns the host name or port number of the current URL             location.hostname: Set or return host name             location.port: Sets or returns the port number of the current URL             Location.protocol: Sets or returns the protocol for the current URL             LOCATION.HREF: Sets or returns the full Url           location.hash: Set or return the URL (anchor) after #            location.search: Sets or returns the query portion of the current URL (? and the following section)            //(2) .            location.reload (): Reload page             location.assign ("URL "): Load New document            location.replace (" url "): Replace the current document with a new page              //histroy:(1) Properties: history.length: Number of URLs in history list (2) method: History.back (): Load previous URL history.forward () : After loading a URL history.go (1); Positive number backward, negative number forward

Summary of properties and methods of JS host Object

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.