Name
Element.removeAttributeNode( ): remove an Attr node from an element — DOM Level 1 Core:
Synopsis
Attr removeAttributeNode(AttroldAttr)
throws DOMException;Arguments
-
oldAttr The Attr node to be removed from the element.
Returns
The Attr node that was removed.
Throws
This method may throw a DOMException with the following
code values:
-
NO_MODIFICATION_ALLOWED_ERR This element is read-only and does not allow attributes to be removed.
-
NOT_FOUND_ERR oldAttris not an attribute of this element.
Description
This method removes (and returns) an Attr node from
the set of attributes of an element. If the removed attribute has a
default value specified by the DTD, a new Attr is added representing
this default value. If is often simpler to use removeAttribute( ) instead of this
method.
See Also
Attr, Element.removeAttribute( )
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access