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> <style> #myDIV { bordure: 1px solide noir; largeur: 200px; hauteur: 100px; débordement: faire défiler; } </style> </head> <body> <p>Essayez la barre de défilement dans div.</p> <div id="myDIV" onscroll="myFunction()">In my younger and more vulnerable years my father gave me some advice that I've been turning over in my mind ever since. <br><br> 'Whenever you feel like criticizing anyone,' he told me, just remember that all the people in this world haven't had the advantages that you've had.'</div> <script> function myFunction() { document.getElementById("myDIV").style.color = "red"; } </script> <p>Une fonction est déclenchée lorsque vous faites défiler dans div. La fonction définit la couleur du texte dans div en rouge.</p> </body> </html>