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/selection/tostring/index.html | 31 ++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 files/fr/web/api/selection/tostring/index.html (limited to 'files/fr/web/api/selection/tostring') diff --git a/files/fr/web/api/selection/tostring/index.html b/files/fr/web/api/selection/tostring/index.html new file mode 100644 index 0000000000..760100faa5 --- /dev/null +++ b/files/fr/web/api/selection/tostring/index.html @@ -0,0 +1,31 @@ +--- +title: toString +slug: Web/API/Selection/toString +tags: + - Référence_du_DOM_Gecko +translation_of: Web/API/Selection/toString +--- +

{{ ApiRef() }}

+

Résumé

+

Renvoie une chaîne de caractères représentant l'actuel objet selection, i.e. le texte sélectionné.

+

Syntaxe

+
string =sel.toString()
+
+ +

Paramètres

+

Aucun.

+

Description

+

Cette méthode renvoie le texte sélectionné.

+

En JavaScript, cette méthode est appelée automatiquement pour des objets selection aux fonctions nécessitant un paramètre string :

+
alert(window.getSelection()) // Appel automatique
+alert(window.getSelection().toString())  // Appel explicite
+
+

Voir aussi

+ +
+  
+

{{ languages( { "en": "en/DOM/Selection/toString", "es": "es/DOM/Selection/toString", "it": "it/DOM/Selection/toString", "pl": "pl/DOM/Selection/toString" } ) }}

-- cgit v1.2.3-54-g00ecf