Adobe 38040334 - Dreamweaver CS3 User Manual page 101

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

Advertisement

Property or method
nodeType •
parentNode •
childNodes •
previousSibling •
nextSibling •
tagName •
attrName
innerHTML
outerHTML
getAttribute(attrName)
getTranslatedAttribute(attrName)
setAttribute(attrName, attrValue)
removeAttribute(attrName)
getElementsByTagName(tagName)
Return value
Node.ELEMENT_NODE
The parent tag. If this is the
HTML
A
NodeList
that contains all the immediate children of the tag.
The sibling node immediately prior to this one. For example, in an HTML
document the
previousSibling
element.
The sibling node immediately following this one. For example, in an HTML
document the
nextSibling
(Any
,
, or
script
style
meta
element.)
head
The HTML
for the element, such as
tagName
returned is always in uppercase letters.
A string that contains the value of the specified tag attribute.
tag.attrName
cannot be used if the
word in the JavaScript language (for example,
and
getAttribute()
setAttribute()
The source code that is contained between the opening tag and the closing
tag. For example, in the code
<p><b>Hello</b>, World!</p>
returns
p.innerHTML
<b>Hello</b>, World!
property, the DOM tree immediately updates to reflect the new structure of
the document. (This property is defined in the Microsoft Internet Explorer 4.0
DOM, but is not part of DOM Level 1 or 2.)
The source code for this tag, including the tag. For the previous example
code,
returns
p.outerHTML
<p><b>Hello</b>, World!</p>
you write to this property, the DOM tree immediately updates to reflect the
new structure of the document. (This property is defined in the Microsoft
Internet Explorer 4.0 DOM, but is not part of DOM Level 1 or 2.)
The value of the specified attribute if it is explicitly specified;
The translated value of the specified attribute or the same value that
getAttribute()
returns if the attribute's value is not translated. (This
property is not included in DOM Level 1; it was added to Dreamweaver 3 to
support attribute translation.)
Does not return a value. Sets the specified attribute to the specified value
example,
img.setAttribute("src", "image/roses.gif")
Does not return a value. Removes the specified attribute and its value from
the HTML for this tag.
A
that can be used to step through child tags of type
NodeList
(for 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.)
Extending Dreamweaver
tag, the document object returns.
for the
body
element is the
for the
element is the
head
body
tags in the head would be child nodes of the
,
, or
. The value
IMG
A
DIV
attrName
attribute is a reserved
). In this case, use
class
.
. If you write to this
null
LAYER
objects, it must
tagName
DREAMWEAVER CS3
95
head
element.
,
. If
otherwise.
.
tagName
and

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents