The browser makes available to us a remarkable number of objects. For example, there is a window object corresponding to the window of the browser. We have already been using two methods of this object, namely the alert() and prompt() methods. For simplicity we previously called these functions, but they are in fact methods of the browser's window object.
Another object made available by the browser is the page itself, represented by the document object. Again, we have already used methods and properties of this object. Recall from Chapter 1 that we used the document object's bgColor property to change the background color of the page. We have also been using the write() method of the document object to write information to the page.
A variety of other objects exist, representing a lot of the HTML that we write in the page. For example, there is an img object for each <img> tag that we use to insert an image into our document.
You will often see this termed the Document Object Model (DOM). However, throughout this book, we'll use the term DOM to refer to the W3C's standard Document Object Model, which is discussed in Chapter 13.