BOM
1. Bom is short for browser object model, that is, browser object model.
2. Bom has no relevant standards.
3.The most fundamental object of BOM is window.
From 1, we can see that Bom is closely related to the browser. Many browser things can be controlled through JavaScript, such as opening a new window, opening a new tab (Tab), closing the page, setting the webpage as the home page, or adding to favorites, etc... These objects are Bom.
As can be seen from 2: because there is no standard, different browsers can implement the same function in different ways. For the functions mentioned above, the JavaScript code required for different browser implementation functions may be different.
For example, adding a feature to favorites:
IE browser: window. External. AddFavorite (URL, title );
Firefox: window. Sidebar. addpanel (title, URL ,"");
Therefore, browser compatibility should be considered when writing this JavaScript code.
Although BOM does not have a set of standards, the JavaScript code for common functions of various browsers is still similar, and there are actually default standards for common functions. Therefore, you don't have to worry too much about browser compatibility. Not every browser has its own Bom, and you don't need to learn a BOM for every browser, only some browsers will display new features on BOM.
Dom
1. Dom is short for Document Object Model, that is, Document Object Model.
2. Dom is W3C standard.
3.The most fundamental object of Dom is document.(Upload upload Doc ument ).
Differences between BOM and Dom