I. BOM
What is BOM?
A: BOM is short for browser object model. It is short for browser object model.
Still don't understand?
A: BOM provides objects that interact with the browser window independently of the content displayed in the browser.
In my personal understanding, we know that the Document and website Crip displayed in the browser must be accessed by DOM to operate the webpage, but only the webpage content. In addition to the displayed content, the browser also has an important part as a carrier that carries what we see. It is like a framework, and the object that operates this carrier is called BOM. Therefore, this structure enables BOM and DOM to perform their respective duties. BOM is responsible for dealing with the browser framework, and DOM is responsible for dealing with the browser content Document.
BOM is used to manage the communication between browser windows. It consists of a series of related objects, and each object provides many methods and attributes. Through BOM, we can learn some objects that interact with the browser window. window objects that can be moved and adjusted in the browser size can be used for navigation location objects and history objects, and browsers can be obtained, the navigator and screen objects of the operating system and user screen information can use document as the portal to access HTML documents and manage frames objects of the framework. Therefore, its core object is window.
Ii. BOM structure
We can see that DOM is an attribute of BOM.
A window object is a top-level (CORE) object of BOM. All objects are extended through it, which can also be called window sub-objects.
Because window is a top-level object, you can call its sub-objects without displaying the specified window object.
You can write either of the following methods:
Document. write ("www.dreamdu.com ");
Using your doc ument. write ("www.dreamdu.com ");