DOMElement::removeAttributeNode

(PHP 5, PHP 7, PHP 8)

DOMElement::removeAttributeNodeRemoves attribute

說(shuō)明

public DOMElement::removeAttributeNode(DOMAttr $attr): DOMAttr|false

Removes attribute attr from the element.

參數(shù)

attr

The attribute node.

返回值

成功時(shí)返回 true, 或者在失敗時(shí)返回 false。

錯(cuò)誤/異常

DOM_NO_MODIFICATION_ALLOWED_ERR

Raised if the node is readonly.

DOM_NOT_FOUND_ERROR

Raised if attr is not an attribute of the element.

參見(jiàn)