Appui sur un bouton non pris en compte
Bonjour à toutes et à tous,
j'ai écrit le code HTML suivant :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>TextArea</title>
<button onclick="info;" class="button button-data">Infos fichiers</button>
</head><body>
<label for="story">Tell us your story:</label>
<textarea id="story" name="story" rows="5" cols="50">It was a dark and
stormy night...
</textarea>
<script>
function info() {
document.getElementById('story').textContent = "ceci est le nouveau texte";
}
</script>
</body></html> |
Lorsque je clique sur le bouton, rien ne se passe. Je ne vois pas mon erreur.
Merci de votre aide.
Pierre.