MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Spezifikationen Seite 134

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 504
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 133
134 The Dreamweaver Document Object Model
Properties and methods of text objects
Each contiguous block of text in an HTML document (for example, the text within a P tag) is
represented by a JavaScript object. Text objects never have children. The following table
describes the properties and methods of text objects that are taken from DOM Level 1 and
used in Dreamweaver. A bullet (•) marks read-only properties.
getElementsByTagName(tagName)
A NodeList that can be used to step through child 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()
A Boolean value that indicates whether the tag has
any children.
hasTranslatedAttributes()
A Boolean value that indicates whether the tag has any
translated attributes. (This property is not included in
DOM Level 1; it was added to Dreamweaver 3 to
support attribute translation.)
Property or method Return value
nodeType • Node.TEXT_NODE
parentNode •
The parent tag
childNodes •
An empty NodeList
data
The actual text string. Entities in the text are
represented as a single character (for example, the text
Joseph & I is returned as Joseph & I).
hasChildNodes() false
Property or method Return value
Seitenansicht 133
1 2 ... 129 130 131 132 133 134 135 136 137 138 139 ... 503 504

Kommentare zu diesen Handbüchern

Keine Kommentare