Réponse

element.setAttribute("name_attribute", "value");

Question

Quelle méthode pour ajouter un attribut à un élément du DOM ?

Thématique