MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Spezifikationen Seite 132

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 504
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 131
132 The Dreamweaver Document Object Model
Properties and methods of HTML tag objects
Every HTML tag is represented by a JavaScript object. Tags are organized in a tree hierarchy,
where tag
x is a parent of tag y, if y falls completely within xs opening and closing tags (<x>x
content <y>y content</y> more x content.</x>
). For this reason, your code should be
well-formed.
The following table lists the properties and methods of tag objects in Dreamweaver, along
with their return values or explanations. A bullet (•) marks read-only properties.
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
Property or method Return value
nodeType • Node.ELEMENT_NODE
parentNode •
The parent tag. If this is the HTML tag, the document
object returns.
Property or method Return value
Seitenansicht 131
1 2 ... 127 128 129 130 131 132 133 134 135 136 137 ... 503 504

Kommentare zu diesen Handbüchern

Keine Kommentare