Javascript BOM Object

Source: Internet
Author: User

The BOM is the abbreviation of the browser object model, or the browser object.

Window Object (the core object of the BOM)

Represents an instance of the browser in which the Window object has a dual role, which is both an excuse to access the browser window through JavaScript, with the advantage of ECMAScript the global object specified. This means that any object, variable, function in the page definition takes window as its global object and therefore has access to methods such as parseint ().

Variables and functions declared at the global scope become properties and methods of the Window object.

Difference: All variables cannot be deleted by the delete operator, whereas properties defined directly on the Window object can. (window.age = 9;)

System dialog box:

Alert ()

Confirm ()

Prompt ()

Location Object :

It provides information about loading documents in the current window, provides navigation capabilities, and resolves URLs to separate fragments. It is both a property of the Window object and a property of the Document object.

Navigator object:

Role:

Detecting Plug-ins

Registering a handler

Screen Object

History Object

// back one page history.go ( -1) history.back ()// forward one page history.go (1) History.forward (); // forward two pages History.go (2)// Determine if the user is the first to open the page if(history.length = = 0  ) {//dosomething}

Javascript BOM 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.