যখন একটি এলিমেন্টের ওপর মাউস হوئিল স্ক্রোল করা হয়, তখন onwheel অ্যাট্রিবিউটটি ট্রিগার হয়।
উদাহরণ
নিচের কোডটি চালিয়ে মাউস হوئিল স্ক্রোল হলে স্ক্রিপ্ট এক্সিকিউট করার পদ্ধতি দেখুন:
<!DOCTYPE html> <html> <head> </head> <body> <div id = "myDIV" onwheel = "display()">This is demo text. Roll the mouse wheel here.</div> <script> function display() { alert("Mouse Wheel used!"); } </script> </body> </html>