Specifications

Chapter 444
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.
mmcolorbutton In addition to the properties
available for all tags:
name
value
None onChange
array
boolean
date
function
math
number
object
string
regexp
MatchesNetscape
Navigator 4
Matches Netscape 4 None
text nodeType •
parentNode •
childNodes •
data
hasChildNodes() None
comment nodeType •
parentNode •
childNodes •
data
hasChildNodes() None
NodeList length • item() None
NamedNodeMap length • item() None
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, it is
supported by Microsoft Internet Explorer 4.0.)
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.
Object Properties Methods Events