HTML-DOM-Attribute
Das Attr-Objekt
Im HTML-DOM repräsentiert das Attr-Objekt ein HTML-Attribut.
Ein HTML-Attribut gehört immer zu einem HTML-Element.
Das NamedNodeMap-Objekt
Im HTML-DOM repräsentiert das NamedNodeMap-Objekt eine ungeordnete Sammlung von Elementattributknoten.
Auf Knoten in einer NamedNodeMap kann nach Name oder Index (Nummer) zugegriffen werden.
Attributeigenschaften und Methoden
Property | Description |
---|---|
isId | Deprecated |
name | Returns an attribute's name |
value | Sets or returns an attribute's value |
specified | Returns true if the attribute is specified |
NamedNodeMap-Eigenschaften und -Methoden
Method | Description |
---|---|
getNamedItem() | Returns an attribute node (by name) from a NamedNodeMap |
item() | Returns an attribute node (by index) from a NamedNodeMap |
length | Returns the number of attributes in a NamedNodeMap |
removeNamedItem() | Removes an attribute (node) |
setNamedItem() | Sets an attribute (node) by name |