BOM and Dom

Source: Internet
Author: User

    • Concept:

1.BOM (Browser Object Model):

The browser object model, from the name can be known that it is closely related to the browser. Many of the browser's behaviors are controlled by JavaScript, such as opening a new window, opening a closed tab, setting a page as a home page, or adding to a collection, and so on, the implementation of which is essentially the operation of the BOM, which is composed of a series of objects that interact with the browser window independently of the content.


2.dom (Document Object Model):

The Document Object model, which is related to the document, where the document refers to a Web page. Web pages are sent to the client browser by the server, regardless of the browser, the received HTML is the same, so Dom and browser-independent, it is concerned about the content of the Web page itself. The DOM defines a series of objects that are used to access, manipulate, and create content, structure, style, and behavior in a document. When you change the content of a page, JavaScript uses the DOM to gain access to all of the elements in the document (HTML, XHTML, and XML documents), as well as methods and properties for adding, moving, changing, or removing elements.

    • Contact and difference:



both 1.BOM and Dom are made up of a series of objects that have properties and methods that JavaScript uses to manipulate these objects to achieve specific functionality.

The 2.Javascript is made up of ECMAScript and BOMs, and the BOM contains the DOM. Where ECMAScript describes the syntax and basic objects of the language,

The BOM describes the methods and interfaces that interact with the browser, and the DOM describes the methods and interfaces that process the content of the Web page.

3.BOM there is no standard, Dom standard is the World Wide Web Consortium, the standardization of JavaScript syntax organization is the ECMA.

The fundamental object of 4.BOM is the Window object, which represents the entire browser window, but does not represent what it contains. The underlying object of the DOM is

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


after understanding the BOM and Dom, and their relationship with JavaScript, I felt a large haze in my brain, "Elephant" has made new progress. JavaScript is an object-based and event-driven language, with the BOM and the object defined in the DOM, you can change the properties of the object, the way to execute the object to achieve real-world functionality, which is the same as the development of the C/S project.

BOM and Dom

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.