当前位置:网站首页>On BOM and DOM (1): overview of BOM and DOM
On BOM and DOM (1): overview of BOM and DOM
2022-06-24 06:36:00 【Army Zhou】
JavaScript The implementation of includes the following 3 Parts of :
- ECMAScript( The core ): It describes JS The grammar and basic objects of .
- Browser object model (BOM): Methods and interfaces for interacting with browsers
- Document object model (DOM): Methods and interfaces for handling web content
DOM- Document object model
DOM( Document object model ) yes HTML and XML The application program interface of , Operation document appears API, It is to operate the interface of the document .DOM Represents the current web page loaded into the browser window : The browser provides us with a map of the current web page ( Or the model ), And we can js Go read this map .
- D( file -document) It can be understood as the whole Web Loaded web documents
- O( object -object) It can be understood as similar window Objects only come from things , You can call properties and methods , What we're talking about here is document object ,
- M( Model -model) It can be understood as the tree structure of Web documents ,DOM A tree is made up of nodes
BOM- Browser object model
BOM yes Browser Object Model, Browser object model ,BOM It mainly deals with browser windows and frames , But usually browser specific JavaScript Extensions are seen as BOM Part of . These extensions include :
- Pop up a new browser window :alert、confirm、prompt
- Move 、 Close and resize browser windows :scrollTo、moveTo、resizeTo etc.
- Provide Web Anchor object for browser details :Navigator、History
- Screen object that provides user screen resolution details :Screen
- Yes cookie Support for :cookie
- IE Expanded BOM, Joined the ActiveXObject class , Can pass JavaScript Instantiation ActiveX object
window Object corresponds to the browser window itself , The properties and methods of this object are often referred to as BOM
DOM contain :window
- Window Object contains properties :document、location、navigator、screen、history、frames
- Document The root node contains child nodes :forms、location、anchors、images、links
from window.document It can already be seen that ,DOM The most fundamental object of is BOM Of window A child of an object .
difference :DOM Describes the methods and interfaces for handling web content ,BOM Describes the methods and interfaces for interacting with browsers .
according to W3C DOM standard ,DOM yes HTML And XML Application programming interface (API),DOM Map the entire page to a file consisting of hierarchical nodes . Yes 1 level 、2 level 、3 Grade in total 3 A level .
BOM And DOM Comparison of
- BOM To handle browser windows and frames
- DOM Interfaces that appear in order to manipulate documents , yes HTML and XML The application program interface of (API).
- DOM yes W3C Standards for ; [ The standards that all browsers follow ]
- BOM yes Each browser manufacturer according to DOM Implementation on their browsers ;[ Different browser definitions are different , Different ways of implementation ]
- window yes BOM object , Instead of js object ;
javacsript By accessing BOM(Browser Object Model) Object to access 、 control 、 Modify the client ( browser ), because BOM Of window Contains document,window The properties and methods of an object are directly available and perceived , So you can use window Object's document attribute , adopt document Properties are accessible 、 retrieval 、 modify XHTML Document content and structure . because document The object is DOM(Document Object Model) The root node of the model . so to speak ,BOM Contains DOM( object ), The browser provides access to BOM object , from BOM Object access to DOM object , thus js It can operate the browser and the documents read by the browser . among DOM contain :window
BOM and DOM Structural relationship diagram of
Reference article :
ECMAScript、BOM、DOM( The core 、 Browser object model and document object model )https://www.cnblogs.com/best/p/8028168.html
JavaScript Learning summary ( 3、 ... and )BOM and DOM Detailed explanation https://segmentfault.com/a/1190000000654274
Javascript operation BOM and DOM Detailed explanation (1) https://blog.csdn.net/openbox2008/article/details/85260063
JavaWeb Learning summary :JavaScript(BOM and DOM) https://blog.csdn.net/weixin_42384085/article/details/99807198
HTML DOM Event object https://www.w3school.com.cn/jsref/dom_obj_event.asp
XML DOM - Element object https://www.w3school.com.cn/xmldom/dom_element.asp
JAVAScript in DOM And BOM The difference analysis of https://www.cnblogs.com/fjner/p/5892325.html
Reprint This station article 《 We can talk BOM and DOM(1):BOM And DOM summary 》, Please indicate the source :https://www.zhoulujun.cn/html/webfront/SGML/xml/2020_0317_8346.html
边栏推荐
- Easyscreen live streaming component pushes RTSP streams to easydss for operation process sharing
- 创客教育给教师发展带来的挑战
- WordPress pill applet build applet from zero to one [pagoda panel installation configuration]
- Web automation test (3): Selenium basic course of web function automation test
- Provide SFTP connection for Amazon S3
- Domain name, resolution, SSL certificate product selection
- 线程安全与实现方法
- How does go limit the flow of services?
- How to give full play to the advantages of Internet of things by edge computing intelligent gateway
- Apache enables gzip compressed web page transmission method
猜你喜欢
Oracle case: ohasd crash on AIX

目标5000万日活,Pwnk欲打造下一代年轻人的“迪士尼乐园”

Enter the software test pit!!! Software testing tools commonly used by software testers software recommendations
Fault analysis | using --force to batch import data leads to partial data loss

【二叉树】——二叉树中序遍历

Manual for automatic testing and learning of anti stepping pits, one for each tester

puzzle(019.1)Hook、Gear

解读AI机器人产业发展的顶层设计

35岁危机?内卷成程序员代名词了

A cigarette of time to talk with you about how novices transform from functional testing to advanced automated testing
随机推荐
目标5000万日活,Pwnk欲打造下一代年轻人的“迪士尼乐园”
Just now, we received a letter of thanks from Bohai University.
Reasons for automatic allocation failure of crawler agent IP
Overview of new features in mongodb5.0
In the half year, there were 2.14 million paying users, a year-on-year increase of 62.5%, and New Oriental online launched its private domain
TensorFlow 2 quickstart for beginners
Architecture: rest and HATEOAS
Free and easy-to-use screen recording and video cutting tool sharing
go 断点续传
What is the role of website domain name
What is an enterprise mailbox domain name? How to register an enterprise mailbox domain name
Linux Apache setting compression and caching
Excel data extraction technique: a universal formula for extracting numbers from mixed text
WordPress pill applet build applet from zero to one [pagoda panel environment installation]
Urban Waterlogging Monitoring and early warning system
Analysis and treatment of easydss flash back caused by system time
MySQL concept - View
Another authoritative recommendation! Tencent zero trust was recognized by omdia Report
Easyscreen live streaming component pushes RTSP streams to easydarwin for operation process sharing
Web automated testing (2): choose selenium advantage? Comparison with phantomjs/qtp/monkey