BOM is Browser Object Model.
Browser Object Model will refer all the objects exposed by the web browser.
How to access the BOM window object ?
Window object can be executed with or without ‘window’ prefix.
What are the objects BOM refers for browser ?
BOM objects include
1. Navigator object.
2. Location object.
3. Window object.
4. Screen object.
5. Document object.
6. History object.
All the objects governs the browser corresponding features.
The Browser objects are created automatically by the browser.
1. Navigator Object
This finds the browser information like ( appCodeName, userAgent, appName, appVersion, etc).
2. Location Object
This finds information about the current URL opened on the web browser.
This also controls the current web page displayed in the web browser.
This have properties like (host, origin, port, pathname, search, etc).
3. Window Object
This is the top most object present in the BOM.
This represents current window opened in the browser at this time.
This contains all the other objects in it.
This have methods and properties, which helps even to control the web browser.
4. Screen Object
This provides the information about the browser screen such as the height, width, pixelDepth, colorDepth, etc.
This contains properties like availWidth, availHeight, colorDepth, pixelDepth.
5. Document Object
The web pages shown in the web browser are represented by the Document Object.
This contains all the tags & elements present on the web page including the HTML elements.
This is the most important part of the Browser Object Model.
6. History Object
This provides all information related to the browser’s history.
This provides a list of all the URL of the websites visited by the user. This is useful for loading any previous page as well as any particular page.
This have three methods
|Sno||Method / Function||Description|
|1||forward()||For loading the browser forward url in the browser.|
|2||go()||For loading the current url in the browser.|
|3||back()||For loading the previous url in the browser.|