O'Reilly logo

Inside JavaScript 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

Chapter 9. Using the document and body Objects

Using the document and body Objects

In this chapter, we’ll take a look at the JavaScript properties, methods, and events of the document object and the <BODY> element. In the early days of JavaScript, before each element became a JavaScript object, the document object gave you access to many aspects of what’s really the <BODY> element—for example, the colors used in the web page. And when you’re writing to a web page, you’re really writing to the <BODY> element. Because JavaScript programmers needed access to more than just the <BODY> element, the document object grew—for example, this object also has a title property that gives you ...

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