Sommaire
Node.innerText
est une propriété représentant le contenu textuel « visuellement rendu » d’un nœud. Utilisé en lecture, il renvoie une approximation du texte que l’utilisateur ou utilisatrice obtiendrait s’il ou elle sélectionnnait le contenu d’un élément avec le curseur, et le copiait dans le presse-papier.
Node.textContent
est une alternative similaire, bien qu’il y ait d’importantes différences entre les deux.
Spécification
Spécification | Statut | Commentaire |
---|---|---|
HTML Living Standard La définition de 'innerText' dans cette spécification. |
Standard évolutif | Introduction basée sur le brouillon de spécification de innerText. Voir whatwg/html#465 et whatwg/compat#5 pour l’histoire. |
Compatibilité des navigateurs
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
No compatibility data found. Please contribute data for "api.Node.innerText" (depth: 1) to the MDN compatibility data repository.