'onMouseWheel' Example : onMouseWheel « Event Handlers Reference « JavaScript Reference

'onMouseWheel' Example

    
<html>
<body>
    <p>Move the pointer on top of the image and then move the mouse wheel up or down.</p>
    <img id="yourimage" 
         src="http://www.java2s.com/style/logo.png" 
         onmousewheel="alert('Wheel Delta: ' + event.wheelDelta);">
</body>
</html>

    
      
      








Related examples in the same category

1.'onMouseWheel' Syntax and Note
2.'onMouseWheel' Properties
3.'onMouseWheel' is applied to