首页 > 编程语言 > 详细

JavaScript:BOM&DOM

时间:2018-10-25 10:04:17      阅读:129      评论:0      收藏:0      [点我收藏+]

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.

 

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

原文:https://www.cnblogs.com/chenzhihong294/p/9847584.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!