If you're seeing this message, it means we're having trouble loading external resources on our website.

তোমার যদি কোন ওয়েব ফিল্টার দেওয়া থাকে, তাহলে দয়া করে নিশ্চিত কর যে *.kastatic.org এবং *.kasandbox.org ডোমেইনগুলো উন্মুক্ত।

মূল বিষয়বস্তু

DOM (ডম) ইভেন্টের (event) প্রকারভেদ

ব্রাউজার অনেকগুলো ইভেন্টের সূচনা করে। ইভেন্টগুলোর একটি তালিকা MDN (মজিলা ডেভেলপার নেটওয়ার্ক) এ রয়েছে এবং এইখানে কয়েকটি সাধারণ ইভেন্টের ধরণ ও নাম দেওয়া হল:
  • মাউসের ইভেন্ট (MouseEvent): mousedown, mouseup, click, dblclick, mousemove, mouseover, mousewheel, mouseout, contextmenu
  • টাচ ইভেন্ট (TouchEvent): touchstart, touchmove, touchend, touchcancel
  • কি-বোর্ডের ইভেন্ট (KeyboardEvent): keydown, keypress, keyup
  • ফর্মের ইভেন্ট: focus, blur, change, submit
  • উইন্ডোর ইভেন্ট: scroll, resize, hashchange, load, unload
You might be wondering when to use touch events versus mouse events, since they're so similar.
Touch events are only triggered on touch-enabled devices like smartphones and touch-screen laptops. Mouse events like click and mousemove are triggered on the majority of browsers and devices. However, in most smartphones, the mouseover event isn't triggered at all, because they can't detect a finger hovering over the phone. Some smartphones are adding sensors for that though, so more smartphones will detect mouseover in the future.
In most cases, you'll want to listen to mouse events instead of touch events, because those are the most universal.

আলোচনায় অংশ নিতে চাও?

কোন আলাপচারিতা নেই।
ইংরেজি জানো? খান একাডেমির ইংরেজি সাইটে আরো আলোচনা দেখতে এখানে ক্লিক কর।