Dom and BOM

Source: Internet
Author: User

Reference from network:

Dom is a platform and language-neutral interface that enables programs and scripts to dynamically access and update the content, structure, and style of documents.

Bom defines the interfaces of various functional components of a browser that can be operated by JavaScript.

DOM(Document Object Model) isHTMLAndXMLApplication Interface (API).

BOMMainly deal with browser windows and frameworks, but usually the browser-specificJavaScriptAll extensions are considered part of BOM. These extensions include:

?
123456 A new browser window is displayed.Move and close the browser window and resize the windowLocating objects with detailed web browser InformationScreen Object that provides detailed information about the user's screen resolutionCookie supportIE extends BOM and adds the activexobject class. ActiveX objects can be instantiated through JavaScript.

javacsriptYes through accessBOM(Browser object model) object to access, control, modify the client (browser), becauseBOMOfwindowContainsdocument, The properties and methods of the window object can be directly used and perceived, so you can directly usewindowObjectdocumentAttribute, throughdocumentYou can access, retrieve, and modify the content and structure of the XHTML document. BecausedocumentThe object is the root node of the DOM (Document Object Model) model. It can be said that BOM containsDOM(Object), the browser provides the BOM object for access, from the BOM object toDOMSo that JS can operate the files read by browsers and browsers. Where
Dom includes:window

?
123 Window objects include attributes: Document, location, Navigator, screen, history, and frames. The document root node contains subnodes: forms, location, anchors, images, and links.

Slavewindow.documentWe can see that the most fundamental object of Dom is the sub-object of the window object of BOM.

Difference: Dom describes the methods and interfaces used to process web content. Bom describes the methods and interfaces used to interact with browsers.

Dom and BOM

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.