What is the DOM and BOM in JavaScript?

后端 未结 8 905
太阳男子
太阳男子 2021-01-29 18:39

What is the DOM and BOM in JavaScript? If someone could explain these in layman terms it would be great! I like to get a deeper understanding of these.

相关标签:
8条回答
  • 2021-01-29 18:51

    The BOM (Browser Object Model) consists of the objects navigator, history, screen, location and document which are children of window. In the document node is the DOM (Document Object Model), the document object model, which represents the contents of the page. You can manipulate it using javascript.

    0 讨论(0)
  • 2021-01-29 18:51
    • DOM - Document Object Model
    • BOM - Browser Object Model

    This article explains relationship between Javascript, DOM and BOM.

    0 讨论(0)
  • 2021-01-29 19:06

    BOM means Browser Object Model . These are objects that you can use to manipulate the browser. they are navigator

    • navigator
    • screen
    • location
    • history
    • document

    they are all children of the Window Object. DOM is Document Object Model is part of the BOM and it helps you manipulate the content of the loaded page file. this include the HTML and CSS

    0 讨论(0)
  • 2021-01-29 19:08

    They're just different objects you're dealing with:

    • The DOM is the Document Object Model, which deals with the document, the HTML elements themselves, e.g. document and all traversal you would do in it, events, etc.
    • The BOM is the Browser Object Model, which deals with browser components aside from the document, like history, location, navigator and screen (as well as some others that vary by browser).
    0 讨论(0)
  • 2021-01-29 19:08

    DOM means Document Object model..when the webpage is loaded the browser creates a document object model for the page..All the objects are arranged as tree structure...

    BOM means Browser Object Model.window object is supported by all browsers it represents the window browser..All global JavaScript objects, functions, and variables automatically become members of the window object.

    0 讨论(0)
  • 2021-01-29 19:08

    You can find more information about Javascript on Mozilla Foundation.

    DOM

    https://developer.mozilla.org/en-US/docs/DOM/DOM_Reference/Introduction

    BOM

    https://developer.mozilla.org/en-US/docs/WebAPI/Browser

    0 讨论(0)
提交回复
热议问题