This article summarizes some methods related to the BOM of javascript. For more information, see. SetTimeout () // latency, only one Code Execution
ClearTimeout () // clear the presenter
SetIntervla () // timer, which executes the code once according to the specified time interval
ClearInterval () // clear the timer
Window. history. length // number of historical pages accessed
Window. history. forward () // Previous Page
Window. history. back (); // next page
Window. history. go (-1); // jump to a previously visited page. A negative value indicates backward hop.
Document. referrer // empty, the value of document. referrer is an empty string.
Window. moveBy // by indicates relative meaning (from the original position)
Window. moveTo // to is the absolute meaning (from the whole)
Window. moveTo // adjust the window size to the specified width and height.
Window. resizeBy // increase or decrease the window size by the specified width and height.
Window. screenLeft/window. screenX // distance from the left side of the screen
Window. screenTop/window. screenY // distance from the screen top
Note:
Browser window location:
IE, Chrome, Safari, and Opera all support window. screenLeft and window. screenTop, but Firxfox does not support these two attributes;
Firxfox, Chrome, Safari, and Opera all provide support for window. screenX and window. screenY, but IE does not support these two attributes;
Document. body. offsetHeight/document. body. clientHeight // content height (body height)
Window. innerHeight // used in Chorm
Document.doc umentElement. clientHeught // visible height of the browser
Document.doc umentElement. scrollHeight // content height (HTML height)
Document.doc umentElement. scrollTop // height of the scroll bar
Window. open // open a new window
Window. close // close the window
Window. defaultStatus/window. Status // Status bar Information
Note: window. status obtains the temporary value assigned by the script. Window. defaultStatus gets the default value.
Document. lastModified // return the last modification time of the document
Document. referrer // return the URL of the previous position in the browser history
Document. title // return the text displayed in the title tab of the current page.
Document. URL // return the URL of the current page
Document. anchors [0]. innerHTML // content of the first anchors on the page
Location. reload (false) // This method forces the browser to refresh the current page
Navigator. appCodeName // declare the browser code name
Navigator. appVirson // return the platform and version information of the browser. This attribute is a read-only string
Eval // can process a piece of JS Code represented by a string
EncodeURI // Encoding
DecodeURI // decode
The above is all the content of this article. I hope you will like it.