Atrybuty HTML DOM
Obiekt Attr
W HTML DOM obiekt Attr reprezentuje atrybut HTML.
Atrybut HTML zawsze należy do elementu HTML.
Obiekt NamedNodeMap
W modelu DOM HTML obiekt NamedNodeMap reprezentuje nieuporządkowaną kolekcję węzłów atrybutów elementów.
Dostęp do węzłów w NamedNodeMap można uzyskać według nazwy lub indeksu (liczby).
Właściwości i metody atrybutów
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 |
Właściwości i metody NamedNodeMap
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 |