O'Reilly logo

Real World XML by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

JavaScript Is Object-Based

JavaScript is an object-based language. The term object-based should not make you nervous: For us, object-based programming will be a lot easier. For our purposes, object-based programming just means that JavaScript makes available objects that give us access to some aspect of the browser or document.

For example, we already have used the document object, one of the most powerful JavaScript objects, in this chapter. That object refers to the body of the Web page in the browser. With this object, you have access to the HTML in the page. In the previous example, I used the writeln (which stands for “write line”) method of the document object to write "Welcome to JavaScript!", like this:

 <SCRIPT LANGUAGE="JavaScript"> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required