The BOM is the abbreviation of the browser object model, or the browser object.
Window Object (the core object of the BOM)
Represents an instance of the browser in which the Window object has a dual role, which is both an excuse to access the browser window through JavaScript, with the advantage of ECMAScript the global object specified. This means that any object, variable, function in the page definition takes window as its global object and therefore has access to methods such as parseint ().
Variables and functions declared at the global scope become properties and methods of the Window object.
Difference: All variables cannot be deleted by the delete operator, whereas properties defined directly on the Window object can. (window.age = 9;)
System dialog box:
Alert ()
Confirm ()
Prompt ()
Location Object :
It provides information about loading documents in the current window, provides navigation capabilities, and resolves URLs to separate fragments. It is both a property of the Window object and a property of the Document object.
Navigator object:
Role:
Detecting Plug-ins
Registering a handler
Screen Object
History Object
// back one page history.go ( -1) history.back ()// forward one page history.go (1) History.forward (); // forward two pages History.go (2)// Determine if the user is the first to open the page if(history.length = = 0 ) {//dosomething}
Javascript BOM Object