DOMElement::removeAttributeNode
PHP Manual
PHP Manual»DOMElement»DOMElement::removeAttributeNode

DOMElement::removeAttributeNode

(PHP 5, PHP 7, PHP 8)

DOMElement::removeAttributeNodeRemoves attribute

Опис

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

Removes attribute attr from the element.

Параметри

attr

The attribute node.

Значення, що повертаються

Повертає true у разі успіху або false в разі помилки.

Помилки/виключення

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.

Прогляньте також

To Top