User Guide

The Dreamweaver DOM 71
Properties and methods of the document object
The following table details the properties and methods of the
document object that are taken
from DOM Level 1 and used in Dreamweaver. A bullet (•) marks read-only properties.
Property or method Return value
nodeType • Node.DOCUMENT_NODE
parentNode • null
parentWindow •
The JavaScript object that corresponds to the document’s
parent window. (This property is not included in DOM Level 1;
however, Microsoft Internet Explorer 4.0 supports it.)
childNodes •
A NodeList that contains all the immediate children of the
document object. Typically the document has a single child,
the
HTML object.
documentElement •
The JavaScript object that corresponds to the HTML tag.
This property is shorthand for getting the value of
document.childNodes and extracting the HTML tag from
the
NodeList.
body •
The JavaScript object that corresponds to the BODY tag. This
property is shorthand for calling
document.documentElement.childNodes and extracting the
BODY tag from the NodeList. For frameset documents, this
property returns the node for the outermost frameset.
URL •
The file://URL for the document or, if the file has not been
saved, an empty string.
getElementsByTagName(tagName)
A NodeList that can be used to step through tags of type
tagName (for example, IMG, DIV, and so on).
If the
tag argument is LAYER, the function returns all LAYER and
ILAYER tags and all absolutely positioned DIV and SPAN tags.
If the
tag argument is INPUT, the function returns all form
elements. (If a name attribute is specified for one or more
tagName objects, it must begin with a letter, which the HTML
4.01 specification requires, or the length of the array that this
function returns is incorrect.)
hasChildNodes() true