July 10, 2001 - The DOM's document Object | WebReference

July 10, 2001 - The DOM's document Object

Yehuda Shiran July 10, 2001
The DOM's document Object
Tips: July 2001

Yehuda Shiran, Ph.D.
Doc JavaScript

The Document Object Model (DOM) has several dualities. One of them is the document object vs. the documentElement object. Internet Explorer 5.5 does not support the document object in the DOM. All its properties are undefined in this case. Internet Explorer 6, on the other hand, does support both of these objects. To understand the difference between the document object and the documentElement object, check their children. The document object's first and last child is HTML. The documentElement object's first child, on the other hand, is HEAD, and its last child is BODY. The following buttons let you find out by yourself the value of these and other properties of the document object as well as those of the documentElement object. We always return the node's name instead of its object, whenever applicable: