What is BOM (Browser Object Model)

Source: Internet
Author: User

If you do not know Bom, You should know Dom.

Dom :(DocumentObject Model)DocumentObject Model.

Bom :(BrowserObject Mode)BrowserObject Model.

From the comparison above, we can clearly see that the biggest difference between BOM and Dom isB (browser)AndD (document)Of
What is the difference between browser and document? The following figure shows that the root node of Dom is document. Often write JavascriptCode, Also
Maybe you will think of the window object. Why is there no window in Dom? This is the difference between BOM and Dom. Window is one of the top objects in JavaScript and it is
It belongs to the browser level and is independent of the document content and the browser.

Bom Resolution:

1. Bom is short for browser object model. It is short for browser object model.
2. Bom provides objects for interaction with browser windows independent of content
3. Because Bom is mainly used to manage the communication between windows, its core object is window
4. Bom consists of a series of related objects, and each object provides many methods and attributes.
5.Bom lacks standards, JavaScript syntax Standardization Organization is ECMA, Dom Standardization Organization is W3C
6. Bom was initially part of the Netscape Browser Standard

BOM structure diagram

A window object is a top-level (CORE) object of BOM. All objects are extended through it, which can also be called Window sub-objects.

Because window is a top-level object, you can call its sub-object without displaying the specified window object. For example, the following two lines of code are the same:

[Code] Document. Write ("test ");
Optional values Doc ument. Write ("test"); [/Code]

The above part content reference: http://www.dreamdu.com/javascript/what_is_bom/

In addition, w3school has a detailed introduction to the window object: http://www.w3school.com.cn/htmldom/dom_obj_window.asp

However, w3school has written the title as an HTML Dom window object. In my opinion, it is more appropriate to change the title to an html bom window 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.