DOMElement::setIdAttribute

(PHP 5, PHP 7, PHP 8)

DOMElement::setIdAttribute — Declara el atributo especificado por su nombre como de tipo ID

Descripción

public function DOMElement::setIdAttribute(string $qualifiedName, bool $isId): void

Declara el atributo qualifiedName como de tipo ID.

Parámetros

qualifiedName

El nombre del atributo.

isId

Establecer a true si se quiere que qualifiedName sea de tipo ID, false si no.

Valores devueltos

No se retorna ningún valor.

Errores/Excepciones

Puede lanzar una DOMException con los siguientes códigos de error:

DOM_NO_MODIFICATION_ALLOWED_ERR

Lanzado si el nodo es de sólo lectura.

DOM_NOT_FOUND_ERR

Lanzado si qualifiedName no es un atributo de este elemento.

Véase también

User Contributed Notes

There are no user contributed notes for this page.
Adding new notes is disabled. Please see the links in the Found A Problem? section.
To Top