Chapter 16

Browser Object Model (BOM)

The browser object model lets us interact with the browser window. The window object represents the browser's window and is supported by all browsers.

Object window is the default object for a browser, so we can specify window or call directly all the functions.

window.alert("Welcome to Learn JavaScript");  

alert("Welcome to Learn JavaScript")

In a similar fashion, we can call other properties underneath the window object such as history, screen, navigator, location, and so on.

results matching ""

    No results matching ""