Element

Example

1

Description

Properties

Property Name Description
tagName the tag name of the element

Methods

Method Name Description Values
getAttributeNode() Returns the Attr object corresponding to the attribute with the specified name.
getAttributeNodeNS() Returns the Attr object corresponding to the attribute with the specified name in the specified namespace.
getAttributeNS() Returns the value of the attribute with the specified name in the specified namespace.
getElementsByTagName() Returns a NodeList of all descendant elements with the given tag name.
getElementsByTagNameNS() Returns a NodeList of all descendant elements with the given tag name in the specified namespace.
hasAttribute() Returns whether the Element has the specified attribute.
hasAttributeNS() Returns whether the Element has the specified attribute in the specified namespace.
removeAttribute() Removes the named attribute from the Element.
removeAttributeNode() Removes the given Attr from the Element.
removeAttributeNS() Removes the named attribute from the Element in the specified namespace.
setAttribute() Adds (or replaces) the named attribute with the given value.
setAttributeNode() Adds (or replaces) the given Attr.
setAttributeNodeNS() Adds (or replaces) the given namespaced Attr.
setAttributeNS() Adds (or replaces) the named attribute with the given value in the given namespace.