Exécuter
❯
Exécuter le code
Ctrl+Alt+R
Sauvegarder le code
Ctrl+Alt+A
Changer d'orientation
Ctrl+Alt+O
Changer de thème
Ctrl+Alt+D
<!DOCTYPE html> <html> <head> <script> function myFunction() { document.getElementById("demo").innerHTML = "Vous avez sélectionné du texte"; } </script> </head> <body> <h1>Événements HTML JavaScript</h1> <h2>L'attribut onselect</h2> Some text: <input type="text" value="Hello world!" onselect="myFunction()"> <p id="demo"></p> </body> </html>