• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 1. Essential JavaScript > Working with Browser Objects in JavaScript

Working with Browser Objects in JavaScript

Many beginning JavaScript programmers have the idea that all they’ll need is built in to the JavaScript language itself, but that’s not so. The JavaScript language is actually very simple, and, more often than not, really serves just as a way to manipulate the objects already built in to a browser. In fact, the real richness is in those browser objects that JavaScript can work with, not so much in the language itself.

Through objects such as the document and window objects, you have access to the HTML in a web page, can open new browser windows, write to the web page, handle user events such as mouse clicks, make the browser navigate to a new location or to a page it’s already been to, support drag and drop, and so on. For example, our first script used the document object’s write method to write to a web page:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint