DOMElement::removeAttributeNode
(PHP 5, PHP 7, PHP 8)
DOMElement::removeAttributeNode — Removes attribute
Description
Removes attribute attr from the element.
Parameters
attr
The attribute node.
Errors/Exceptions
May throw a DOMException with the following error codes:
DOM_NO_MODIFICATION_ALLOWED_ERR
Raised if the node is readonly.
DOM_NOT_FOUND_ERR
Raised if attr is not an attribute of the element.
See Also
- DOMElement::hasAttribute() - Checks to see if attribute exists
- DOMElement::getAttributeNode() - Returns attribute node
- DOMElement::setAttributeNode() - Adds new attribute node to element
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
