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 --- files/fr/web/api/element/setattributens/index.md | 45 ++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 files/fr/web/api/element/setattributens/index.md (limited to 'files/fr/web/api/element/setattributens/index.md') diff --git a/files/fr/web/api/element/setattributens/index.md b/files/fr/web/api/element/setattributens/index.md new file mode 100644 index 0000000000..1274563722 --- /dev/null +++ b/files/fr/web/api/element/setattributens/index.md @@ -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