Javascript examples for DOM Event:onwheel
The onwheel event occurs when the mouse wheel is rolled up or down over an element.
Bubbles | Yes |
---|---|
Cancelable | Yes |
Supported HTML tags: | All HTML elements |
<!DOCTYPE html> <html> <head> <style> #myDIV {/*from w w w .j a v a2 s .c o m*/ border: 1px solid black; } </style> </head> <body> <div id="myDIV" onwheel="myFunction()"> This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. </div> <script> function myFunction() { document.getElementById("myDIV").style.fontSize = "35px"; } </script> </body> </html>