DOM (Document Object Model) and BOM (Browser Object Model) are two important concepts in Web development. They provide access and manipulation of web page content and browser Interfaces for functions such as windows and history. Below I will list some common DOM and BOM objects:
DOM object
- document: represents the entire HTML document and can be used to access and operate elements, styles, and events in the document wait.
- element: Represents HTML elements, such as ,
, etc. These elements can be obtained and manipulated through DOM methods.
- Node: Represents nodes in the DOM tree, including element nodes, text nodes, comment nodes, etc.
- Event: represents the event object, including relevant information when the event is triggered, such as event type, target element, etc.
- Window: Represents the browser window and provides window-related methods and properties, such as timers, pop-up boxes, etc.
BOM object
- window: represents the browser window and provides global browser environment-related methods and properties, such as opening new windows, closing windows, and setting timings Devices etc.
- navigator: Represents browser information, including browser type, version, operating system, etc.
- location: Represents the URL information of the current window and can be used to get and set the URL of the current page.
- history: Represents the history of the browser, which can be used to operate forward, backward, or jump to a specified page.
- screen: Represents the user's screen information, such as screen width, height, etc.
In addition to the objects listed above, there are many other DOM and BOM objects available for developers to control and interact with web content and browser windows. These objects provide a rich set of methods and properties, allowing developers to flexibly handle web page and browser-related operations.