From c05efa8d7ae464235cf83d7c0956e42dc6974103 Mon Sep 17 00:00:00 2001 From: julieng Date: Sat, 2 Oct 2021 17:20:14 +0200 Subject: move *.html to *.md --- .../fr/web/api/document/createattribute/index.html | 91 ---------------------- 1 file changed, 91 deletions(-) delete mode 100644 files/fr/web/api/document/createattribute/index.html (limited to 'files/fr/web/api/document/createattribute/index.html') diff --git a/files/fr/web/api/document/createattribute/index.html b/files/fr/web/api/document/createattribute/index.html deleted file mode 100644 index bfec33bfa2..0000000000 --- a/files/fr/web/api/document/createattribute/index.html +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: document.createAttribute -slug: Web/API/Document/createAttribute -tags: - - API - - DOM - - Méthodes - - Reference -translation_of: Web/API/Document/createAttribute ---- -

{{ApiRef("DOM")}}

- -

La méthode Document.createAttribute() crée un nouveau nœud d'attribut et le renvoie. L'objet a créé un noeud implémentant l'interface {{domxref("Attr")}}. Le DOM n'impose pas le type d'attribut à ajouter à un élément particulier de cette manière.

- -
-

Note : La chaîne de caractères donnée dans le paramètre est convertie en minuscules.

-
- -

Syntaxe

- -
attribut = document.createAttribute(nom)
-
- -

Paramètres

- - - -

Valeur de retour

- -

Un nœud {{domxref("Attr")}}.

- -

Exceptions levées

- - - -

Exemples

- - -
var node = document.getElementById("div1");
-var a = document.createAttribute("my_attrib");
-a.value = "newVal";
-node.setAttributeNode(a);
-console.log(node.getAttribute("my_attrib")); // "newVal"
-
-

Spécifications

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SpécificationÉtatCommentaires
{{SpecName('DOM WHATWG','#dom-document-createattribute','Document.createAttribute()')}}{{Spec2("DOM WHATWG")}} Comportement précis avec des caractères majuscules.
{{SpecName('DOM3 Core','core.html#ID-1084891198','Document.createAttribute()')}}{{Spec2('DOM3 Core')}}Pas de modification.
{{SpecName('DOM2 Core','core.html#ID-1084891198','Document.createAttribute()')}}{{Spec2('DOM2 Core')}}Pas de modification.
{{SpecName('DOM1','level-one-core.html#ID-1084891198','Document.createAttribute()')}}{{Spec2('DOM1')}}Définition initiale.
- -

Compatibilité des navigateurs

- -

{{Compat("api.Document.createAttribute")}}

- -

Voir aussi

- - -- cgit v1.2.3-54-g00ecf