DOM Attributes
Attr Object
Represents an HTML attribute.
(A DOM Attribute always belongs to a DOM Element.)
| Property / Method |
Description |
| attr.isId | Returns true if the attribute is of type Id, otherwise it returns false |
| attr.name | Returns the name of an attribute |
| attr.value | Sets or returns the value of the attribute |
| attr.specified | Returns true if the attribute has been specified, otherwise it returns false |
NamedNodeMap Object
Represents a(n unordered) collection of an element's attribute nodes.
| Property / Method |
Description |
| nodemap.getNamedItem() | Returns a specified attribute node from a NamedNodeMap |
| nodemap.item() | Returns the attribute node at a specified index in a NamedNodeMap |
| nodemap.length | Returns the number of attribute nodes in a NamedNodeMap |
| nodemap.removeNamedItem() | Removes a specified attribute node |
| nodemap.setNamedItem() | Sets the specified attribute node (by name) |