From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/fr/web/api/element/setattributens/index.html | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 files/fr/web/api/element/setattributens/index.html (limited to 'files/fr/web/api/element/setattributens') diff --git a/files/fr/web/api/element/setattributens/index.html b/files/fr/web/api/element/setattributens/index.html new file mode 100644 index 0000000000..d5b1699a1b --- /dev/null +++ b/files/fr/web/api/element/setattributens/index.html @@ -0,0 +1,45 @@ +--- +title: element.setAttributeNS +slug: Web/API/Element/setAttributeNS +tags: + - API + - DOM + - Element + - Méthodes +translation_of: Web/API/Element/setAttributeNS +--- +

{{ APIRef("DOM") }}

+ +

setAttributeNS ajoute un nouvel attribut ou modifie la valeur d'un attribut avec un espace de noms et un nom donnés.

+ +

Syntaxe

+ +
element.setAttributeNS(
+namespace,
+name,
+value)
+ + + +

Exemple

+ +
var d = document.getElementById("d1");
+d.setAttributeNS("http://www.mozilla.org/ns/specialspace", "align", "center");
+
+ +

Notes

+ +

{{ DOMAttributeMethods() }}

+ +

setAttributeNS  est la seule méthode pour les attributs d'espace nom qui attend le nom qualifié complet, c'est-à-dire "namespace:localname".

+ +

Spécification

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