Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h1>HTML DOM Events</h1>
<h2>The onwheel Event</h2>
<p>Use the addEventListener() method to attach a "wheel" event to an element:</p>
<div id="myDIV" style="border:1px solid black">
<p>Roll the mouse wheel over me!</p>
</div>
<script>
document.getElementById("myDIV").onwheel = function() {myFunction()};
function myFunction() {
  document.getElementById("myDIV").style.fontSize = "35px";
}
</script>
</body>
</html>