July 10, 2001 - The DOM's document Object
July 10, 2001 The DOM's document Object Tips: July 2001
Yehuda Shiran, Ph.D.
|
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: