Adobe 38040334 - Dreamweaver CS3 User Manual page 100

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

Property or method
nodeType •
parentNode •
parentWindow •
childNodes •
previousSibling •
nextSibling •
documentElement •
body •
URL •
getElementsByTagName(tagName)
getElementsById(Id)
getElementsByAttributeName(attrName)
getElementById(id)
hasChildNodes()
Properties and methods of HTML
The following table lists the properties and methods of HTML elements in Dreamweaver, along with their return
values or explanations. A bullet (•) marks read-only properties.
Return value
Node.DOCUMENT_NODE
null
The JavaScript object that corresponds to the document's parent window.
(This property is defined in the Microsoft Internet Explorer 4.0 DOM, but is not
part of DOM Level 1 or 2.)
A
that contains all the immediate children of the
NodeList
object. Typically the document has a single child, the
null
null
The JavaScript object that corresponds to the
shorthand for getting the value of
extracting the
HTML
tag from the
The JavaScript object that corresponds to the
shorthand for calling
document.documentElement.childNodes
and extracting the
tag from the
body
this property returns the node for the outermost frameset.
The
for the document or, if the file has not been saved, an
file://URL
empty string.
A
that can be used to step through tags of type
NodeList
example,
img
,
div
, and so on).
If the
argument is "LAYER", the function returns all
tagName
ILAYER
tags and all absolutely positioned elements.
If the
argument is "INPUT", the function returns all form elements.
tagName
(If a name attribute is specified for one or more
begin with a letter, which the HTML 4.01 specification requires, or the length
of the array that this function returns is incorrect.)
Gets the element node with the specified
the ID of the element to get.
var dom = dw.getDocumentDOM();
var contObj = dom.getElementById('content');
alert("The element with the id 'content' is a " +
contObj.tagName);
A
NodeList
that can be used to step through elements with an attribute
(for example, all elements with the attribute "for"). Not part of
attrName
DOM Level 1 or 2.
The HTML element with the specified ID.
true
DREAMWEAVER CS3
Extending Dreamweaver
document
HTML
object.
html
tag. This property is
and
document.childNodes
NodeList
.
tag. This property is
body
. For frameset documents,
NodeList
tagName
LAYER
objects, it must
tagName
. Where
is a string containing
id
id
94
(for
and

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents