JavaScript:BOM&DOM

Posted 陈府

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了JavaScript:BOM&DOM相关的知识,希望对你有一定的参考价值。

BOM(Browser Object Model):

feature:

  1.BOM has no relevant standards.

  2.The fundamental object of BOM is window.

explain:

  We can know that BOM is closely related to the browser from it\'s name.

  Many things in the browser can be controlled through javascript , and all of them are conneted with BOM.

  eg: 

    ①Open a new window

    ②Open the new TAB (TAB)

    ③Close the page

    ④Set the homepage as the home page

    In a word, BOM is that a browser window show except web page content.

    

    All of this picture show are classified to BOM.

 

DOM(Document Object Model):

feature:

  1.The standard of DOM is W3C.

  2.The fundamental object of BOM is document (we also can say window.document).

explain:

  We can know that BOM is related to Document from it\'s name.In fact, the document refers to the web page.It named html document.

  Because web pages are sent by the server to the client browser and the HTML received is the same no matter what browser you use.

  So,DOM is independence with browser.This is the reason why standard of DOM was fixed.

  eg:

    All of those that the same things when you use different browser to open same web page.

           

    All of this picture show are classified to DOM.

 

以上是关于JavaScript:BOM&DOM的主要内容,如果未能解决你的问题,请参考以下文章

08.30 javascript BOM &DOM

前端基础之JavaScript重点之DOM&BOM

z-index控制层级显示JavaScript-Dom&Bom

DOM&BOM

关于dom&bom

JavaScript的3大组成部分&&ECMAScript函数&&闭包