JavaScript's BOM five objects (window;location;navigator;screen;history)

Source: Internet
Author: User
Tags time in milliseconds

First, window

1. browser window and page size
2. The intermittent call and timeout call
SetInterval (Function,time (in milliseconds)) returns: Time ID number (provides an identifier for the Clearinterval (Timeid) method) br> clearinterval (Timeid); Cancels the intermittent call to
SetTimeout (function,time in milliseconds) to return: Time ID number (provides an identifier for the cleartimeout (Timeid) method)
Cleartimeout (Timeid);    Cancel Timeout call

3. Navigate and open Window
window.open (args)://Navigate to a specific URL, or open a new browser window
first parameter: URL to load
Second parameter: Window target
    Third parameter: an attribute string [Height,width,left,menubar,resizable,scrollbars,status,toolbar,top]
The fourth parameter: whether the new page supersedes the Boolean value of the currently loaded page in the browser history

//<a href= "www.baidu.com" target= "Topframe";
//www.baidu.com: <p id= "Topframe" >text content</p>
Eg:window.open ("www.baidu.com", "Topframe", "height=400,width=400 , Top=10,left=10,resizable=yes ");
Window.opener:
1. Save the original window object that opened it. This property is defined only in the outermost window object (top) of the popup and points to the window or frame that calls window.open ().
Window.opener = = Window[true]
2. Setting the opener property to Null is to tell the browser that the newly created tab page does not need to communicate with the tab that opens it, so: you can run it independently. Once the tab is cut off, it cannot be restored

Window.close (): Close the current page "theoretically: limited to: Windows opened with the Open method"
Window.closed: Returns a Boolean value: whether to close

  

JavaScript's BOM five objects (window;location;navigator;screen;history)

Related Article

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.