Home >Backend Development >PHP Tutorial >Analysis of the difference between BOM and DOM
The realization of various functions of DHTML technology relies on the interaction between the client script and the browser host and the Web page output in the host. This interaction is achieved through the technical means of objects.
The implementation of various functions of DHTML technology relies on the interaction between the client script and the browser host and the Web page output in the host. This interaction is achieved through the technical means of objects. The difference between BOM and DOM # The implementation of various functions of DHTML technology relies on the interaction between the client script and the browser host and the Web page output in the host. This interaction is achieved through the technical means of objects. # BOM is the Browser Object Model. It is an extension API implemented on the basis of the core of client scripts. Through this API, scripts can be used to access all aspects of the browser window and its document objects. BOM was introduced from IE3.0/NS3.0. # In the BOM API, the main explicit features of the web browser, web pages and their tags, content, etc. are encapsulated into objects. Windows, documents, element objects, etc. are accessed through the members provided by these objects, and in On this basis, the object's event support mechanism is implemented. There is a certain relationship between all BOM objects. # Learning BOM technology is mainly about learning how to use BOM objects using client scripts. Many DHTML functions can be achieved through these encapsulated BOM objects. # BOM technology is not a standardized web technology and varies from browser to browser. Because of this, the application fields and development prospects of DHTML technology are greatly limited. # The BOM technology implemented by different browsers is not unified, which is the main reason for the differences in DHTML technology implementation. Therefore, W3C expanded, improved and optimized based on BOM technology, and formulated a new unified technical specification standard, namely DOM (Document Object Model) document object model technology. # DOM technology was originally a technical specification developed for the parsing and control of XML documents, but it can convert XML documents into XHTML documents, and use DOM technology to access various objects in Web page documents. # Currently, W3C has developed three different levels for DOM technical specifications, namely DOM Level 1/2/3. IE5/NS6 begins to fully support DOM Level 1. Sometimes some people also call BOM technology DOM Level 0 [W3C official does not have this statement! ]. # The core of DOM technology is to parse the XML (including XHTML) document structure into a tree structure. Each mark is regarded as a node. There is a certain relationship between the nodes, and they can access each other through these relationships. # DOM technology is closely related to XML technology. The technical content involved is complex and difficult to learn. However, it will be helpful to learn DOM technology after mastering BOM technology. # DOM technology can not only be used in scripting languages such as JavaScript, but also widely used in heavyweight programming languages such as Java. Articles you may be interested in: php example: detect and clear BOM information at the beginning of the file Php implementation code for batch removal of BOM header information Sharing code for removing BOM in php A simple example of PHP filtering BOM data in the page Detect whether the php file has BOM header code How to batch clear BOM in php files Check and clear the BOM function in the php file About the solution to style confusion caused by UTF-8 BOM About the detection and deletion of BOM in UTF-8 encoding |