Accès aux variables Javascript en HTML

Dire que j'ai le code JavaScript suivant dans une page HTML

<html>
<script>
    var simpleText = "hello_world";
    var finalSplitText = simpleText.split("_");
    var splitText = finalSplitText[0];
</script>

<body>
    <a href = test.html>I need the value of "splitText" variable here</a>
</body>
</html>

Comment puis-je obtenir la valeur de la variable "splitText" en dehors des balises de script.

Merci!

source d'informationauteur Damien-Amen