exemple
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
<!DOCTYPE html>
<html lang="fr">
<head><meta charset="UTF-8" /></head>
<body>
  <span id="truc">texte initial...</span>
  <script>
    truc.innerText = 'bla bla bla';
  </script>
</body></html>
et ça marche!
J'ai "rapidement et mal" cherché , je n'ai trouvé aucune new ou info sur le sujet.
l'impression d'avoir raté un train..

Est-ce LA bonne pratique et on doit abandonner la méthode getElementById ??