Exécuter
❯
Exécuter le code
Ctrl+Alt+R
Enregistrer le code
Ctrl+Alt+A
Changer d'orientation
Ctrl+Alt+O
Changer de thème
Ctrl+Alt+D
<!DOCTYPE html> <html> <body> <h1>Événements HTML JavaScript</h1> <h2>L'attribut onkeyup</h2> <p>Un événement onkeyup se produit lorsqu'une touche du clavier est en train de remonter :</p> <form> Entrez votre nom : <input type="text" name="myInput" onkeyup="writeMessage()" size="20"> <input type="text" name="mySecondInput" size="20"> </form> <script> function writeMessage() { document.forms[0].mySecondInput.value = document.forms[0].myInput.value; } </script> </body> </html>