Interpreting BOM and COM, interpreting BOMCOM

Source: Internet
Author: User

Interpreting BOM and COM, interpreting BOMCOM

  • Concept:

1. BOM (Browser Object Model ):

The browser object model is closely related to the browser by name. Many browser behaviors are controlled by JavaScript, such as opening a new window, opening or closing a tab, setting a webpage as a home page, or adding it to favorites, these functions are essentially BOM operations. BOM is composed of a series of objects that interact with browser windows independently of the content.


2. DOM (Document Object Model ):

Document Object Model, which is related to the document. The document here refers to the webpage. A webpage is sent to the client browser by the server. The HTML received by any browser is the same, so DOM is irrelevant to the browser. It focuses on the content of the webpage. DOM defines a series of objects for accessing, manipulating, and creating content, structures, styles, and actions in a document. When the page content is changed, JavaScript uses DOM to obtain the access entries for all elements in the document (HTML, XHTML, and XML documents, methods and attributes for adding, moving, changing, or removing elements.

  • Contact and difference:



1. Both BOM and DOM are composed of a series of objects with attributes and Methods. javascript can manipulate these objects to implement specific functions.

2. Javascript consists of ECMAScript and BOM, which contains DOM. ECMAScript describes the syntax and basic objects of the language,

BOM describes the methods and interfaces used to interact with the browser, and DOM describes the methods and interfaces used to process webpage content.

3. BOM has no standards, DOM standards are W3C (World Wide Web Alliance), and JavaScript syntax Standardization Organization is ECMA.

4. The fundamental object of BOM is the window object, which indicates the entire browser window, but not the content contained in it. The basic object of DOM is

Document object, which is actually the property of the window object. Document is an object that belongs to both BOM and DOM.


After understanding BOM and DOM and Their Relationship with javascript, I feel that a large piece of haze in my mind has vanished,New progress has been made in "blindly touching images. Javascript is an object-and event-driven language that includes the objects defined in BOM and DOM, you can change the attributes of an object and execute the object to implement the specific functions in the real world. This is the same as the previous C/S project development.

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.