Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <h1>HTML DOM Events</h1> <h2>The onwheel Event</h2> <p>Assign an "onwheel" event to an element:</p> <div id="myDIV" style="border:1px solid black" onwheel="myFunction()"> <p>Roll the mouse wheel over me!</p> </div> <script> function myFunction() { document.getElementById("myDIV").style.fontSize = "35px"; } </script> </body> </html>