HTML DOM
ইভেন্ট
HTML DOM ইভেন্টগুলি জাভাস্ক্রিপ্টকে একটি HTML নথিতে উপাদানগুলিতে বিভিন্ন ইভেন্ট
হ্যান্ডলার নিবন্ধন করার অনুমতি দেয়।
ইভেন্টগুলি সাধারণত ফাংশনের সংমিশ্রণে ব্যবহার করা হয় এবং ইভেন্টটি হওয়ার আগে ফাংশনটি
কার্যকর করা হবে না (যেমন যখন কোনও ব্যবহারকারী একটি বোতামে ক্লিক করে)।
ইভেন্ট সম্পর্কে টিউটোরিয়ালের জন্য, আমাদের জাভাস্ক্রিপ্ট ইভেন্ট টিউটোরিয়াল পড়ুন ।
Event Occurs when Belongs To
abort The loading of a media is aborted UiEvent, Event
afterprint A page has started printing, or if the print Event
dialogue box has been closed
animationend A CSS animation has completed AnimationEvent
animationiteration A CSS animation is repeated AnimationEvent
animationstart A CSS animation has started AnimationEvent
beforeprint A page is about to be printed Event
beforeunload Before a document is about to be unloaded UiEvent, Event
blur An element loses focus FocusEvent
canplay The browser can start playing the media (has Event
buffered enough to begin)
canplaythrough The browser can play through the media Event
without stopping for buffering
change The content of a form element has changed Event
click An element is clicked on MouseEvent
contextmenu An element is right-clicked to open a context MouseEvent
menu
copy The content of an element is copied ClipboardEvent
cut The content of an element is cutted ClipboardEvent
dblclick An element is double-clicked MouseEvent
drag An element is being dragged DragEvent
dragend Dragging of an element has ended DragEvent
dragenter A dragged element enters the drop target DragEvent
dragleave A dragged element leaves the drop target DragEvent
dragover A dragged element is over the drop target DragEvent
dragstart Dragging of an element has started DragEvent
drop A dragged element is dropped on the target DragEvent
durationchange The duration of a media is changed Event
ended A media has reach the end ("thanks for Event
listening")
error An error occurs while loading an external file ProgressEvent, UiEvent, Event
focus An element gets focus FocusEvent
focusin An element is about to get focus FocusEvent
focusout An element is about to lose focus FocusEvent
fullscreenchange An element is displayed in fullscreen mode Event
fullscreenerror An element can not be displayed in fullscreen Event
mode
hashchange There has been changes to the anchor part of HashChangeEvent
a URL
input An element gets user input InputEvent, Event
invalid An element is invalid Event
keydown A key is down KeyboardEvent
keypress A key is pressed KeyboardEvent
keyup A key is released KeyboardEvent
load An object has loaded UiEvent, Event
loadeddata Media data is loaded Event
loadedmetadata Meta data (like dimensions and duration) are Event
loaded
loadstart The browser starts looking for the specified ProgressEvent
media
message A message is received through the event Event
source
mousedown The mouse button is pressed over an element MouseEvent
mouseenter The pointer is moved onto an element MouseEvent
mouseleave The pointer is moved out of an element MouseEvent
mousemove The pointer is moved over an element MouseEvent
mouseover The pointer is moved onto an element MouseEvent
mouseout The pointer is moved out of an element MouseEvent
mouseup A user releases a mouse button over an MouseEvent
element
mousewheel Deprecated. Use the wheel event instead WheelEvent
offline The browser starts to work offline Event
online The browser starts to work online Event
open A connection with the event source is Event
opened
pagehide User navigates away from a webpage PageTransitionEvent
pageshow User navigates to a webpage PageTransitionEvent
paste Some content is pasted in an element ClipboardEvent
pause A media is paused Event
play The media has been started or is no longer Event
paused
playing The media is playing after having been Event
paused or stopped for buffering
popstate The window's history changes PopStateEvent
progress The browser is downloading media data Event
ratechange The playing speed of the media is changed Event
resize The document view is resized UiEvent, Event
reset A form is reset Event
scroll An element's scrollbar is being scrolled UiEvent, Event
search Something is written in a search field Event
seeked Skipping to a media position is finished Event
seeking Skipping to a media position is started Event
select User selects some text UiEvent, Event
show A <menu> element is shown as a context Event
menu
stalled The browser is trying to get media data, but Event
data is not available
storage A Web Storage area is updated StorageEvent
submit A form is submitted Event
suspend The browser is intentionally not getting Event
media data
timeupdate The playing position has changed (like when Event
the user fast forwards to a different point in
the media)
toggle The user opens or closes the <details> Event
element
touchcancel The touch is interrupted TouchEvent
touchend A finger is removed from a touch screen TouchEvent
touchmove A finger is dragged across the screen TouchEvent
touchstart A finger is placed on a touch screen TouchEvent
transitionend A CSS transition has completed TransitionEvent
unload A page has unloaded (for <body>) UiEvent, Event
volumechange The volume of the media has changed Event
(includes setting the volume to "mute")
waiting The media has paused but is expected to Event
resume (like when the media pauses to
buffer more data)
wheel The mouse wheel rolls up or down over an WheelEvent
element
HTML DOM ইভেন্ট বৈশিষ্ট্য এবং পদ্ধতি
Property/Method Description Belongs To
altKey Returns whether the "ALT" key MouseEvent
was pressed when the mouse
event was triggered
altKey Returns whether the "ALT" key KeyboardEvent, TouchEvent
was pressed when the key event
was triggered
animationName Returns the name of the AnimationEvent
animation
bubbles Returns whether or not a Event
specific event is a bubbling
event
button Returns which mouse button MouseEvent
was pressed when the mouse
event was triggered
buttons Returns which mouse buttons MouseEvent
were pressed when the mouse
event was triggered
cancelable Returns whether or not an Event
event can have its default action
prevented
charCode Returns the Unicode character KeyboardEvent
code of the key that triggered
the onkeypress event
changeTouches Returns a list of all the touch TouchEvent
objects whose state changed
between the previous touch and
this touch
clientX Returns the horizontal MouseEvent, TouchEvent
coordinate of the mouse
pointer, relative to the current
window, when the mouse event
was triggered
clientY Returns the vertical coordinate MouseEvent, TouchEvent
of the mouse pointer, relative to
the current window, when the
mouse event was triggered
clipboardData Returns an object containing the ClipboardData
data affected by the clipboard
operation
code Returns the code of the key that KeyboardEvent
triggered the event
composed Returns whether the event is Event
composed or not
ctrlKey Returns whether the "CTRL" key MouseEvent
was pressed when the mouse
event was triggered
ctrlKey Returns whether the "CTRL" key KeyboardEvent, TouchEvent
was pressed when the key event
was triggered
currentTarget Returns the element whose Event
event listeners triggered the
event
data Returns the inserted characters InputEvent
dataTransfer Returns an object containing the DragEvent, InputEvent
data being dragged/dropped, or
inserted/deleted
defaultPrevented Returns whether or not the Event
preventDefault() method was
called for the event
deltaX Returns the horizontal scroll WheelEvent
amount of a mouse wheel (x-
axis)
deltaY Returns the vertical scroll WheelEvent
amount of a mouse wheel (y-
axis)
deltaZ Returns the scroll amount of a WheelEvent
mouse wheel for the z-axis
deltaMode Returns a number that WheelEvent
represents the unit of
measurements for delta values
(pixels, lines or pages)
detail Returns a number that indicates UiEvent
how many times the mouse was
clicked
elapsedTime Returns the number of seconds AnimationEvent
an animation has been running
elapsedTime Returns the number of seconds
a transition has been running
eventPhase Returns which phase of the Event
event flow is currently being
evaluated
getTargetRanges() Returns an array containing InputEvent
target ranges that will be
affected by the
insertion/deletion
getModifierState() Returns an array containing MouseEvent
target ranges that will be
affected by the
insertion/deletion
inputType Returns the type of the change InputEvent
(i.e "inserting" or "deleting")
isComposing Returns whether the state of InputEvent, KeyboardEvent
the event is composing or not
isTrusted Returns whether or not an Event
event is trusted
key Returns the key value of the key KeyboardEvent
represented by the event
key Returns the key of the changed StorageEvent
storage item
keyCode Returns the Unicode character KeyboardEvent
code of the key that triggered
the onkeypress event, or the
Unicode key code of the key
that triggered the onkeydown or
onkeyup event
location Returns the location of a key on KeyboardEvent
the keyboard or device
lengthComputable Returns whether the length of ProgressEvent
the progress can be computable
or not
loaded Returns how much work has ProgressEvent
been loaded
metaKey Returns whether the "META" MouseEvent
key was pressed when an event
was triggered
metaKey Returns whether the "meta" key KeyboardEvent, TouchEvent
was pressed when the key event
was triggered
MovementX Returns the horizontal MouseEvent
coordinate of the mouse pointer
relative to the position of the
last mousemove event
MovementY Returns the vertical coordinate MouseEvent
of the mouse pointer relative to
the position of the last
mousemove event
newValue Returns the new value of the StorageEvent
changed storage item
newURL Returns the URL of the HasChangeEvent
document, after the hash has
been changed
offsetX Returns the horizontal MouseEvent
coordinate of the mouse pointer
relative to the position of the
edge of the target element
offsetY Returns the vertical coordinate MouseEvent
of the mouse pointer relative to
the position of the edge of the
target element
oldValue Returns the old value of the StorageEvent
changed storage item
oldURL Returns the URL of the HasChangeEvent
document, before the hash was
changed
onemptied When something bad happens
and the media file is suddenly
unavailable (like unexpectedly
disconnects)
pageX Returns the horizontal MouseEvent
coordinate of the mouse
pointer, relative to the
document, when the mouse
event was triggered
pageY Returns the vertical coordinate MouseEvent
of the mouse pointer, relative to
the document, when the mouse
event was triggered
persisted Returns whether the webpage PageTransitionEvent
was cached by the browser
preventDefault() Cancels the event if it is Event
cancelable, meaning that the
default action that belongs to
the event will not occur
propertyName Returns the name of the CSS AnimationEvent, TransitionEvent
property associated with the
animation or transition
pseudoElement Returns the name of the AnimationEvent, TransitionEvent
pseudo-element of the
animation or transition
region MouseEvent
relatedTarget Returns the element related to MouseEvent
the element that triggered the
mouse event
relatedTarget Returns the element related to FocusEvent
the element that triggered the
event
repeat Returns whether a key is being KeyboardEvent
hold down repeatedly, or not
screenX Returns the horizontal MouseEvent
coordinate of the mouse
pointer, relative to the screen,
when an event was triggered
screenY Returns the vertical coordinate MouseEvent
of the mouse pointer, relative to
the screen, when an event was
triggered
shiftKey Returns whether the "SHIFT" MouseEvent
key was pressed when an event
was triggered
shiftKey Returns whether the "SHIFT" KeyboardEvent, TouchEvent
key was pressed when the key
event was triggered
state Returns an object containing a PopStateEvent
copy of the history entries
stopImmediatePropagation() Prevents other listeners of the Event
same event from being called
stopPropagation() Prevents further propagation of Event
an event during event flow
storageArea Returns an object representing StorageEvent
the affected storage object
target Returns the element that Event
triggered the event
targetTouches Returns a list of all the touch TouchEvent
objects that are in contact with
the surface and where the
touchstart event occured on the
same target element as the
current target element
timeStamp Returns the time (in Event
milliseconds relative to the
epoch) at which the event was
created
total Returns the total amount of ProgressEvent
work that will be loaded
touches Returns a list of all the touch TouchEvent
objects that are currently in
contact with the surface
transitionend A CSS transition has completed TransitionEvent
type Returns the name of the event Event
url Returns the URL of the changed StorageEvent
item's document
which Returns which mouse button MouseEvent
was pressed when the mouse
event was triggered
which Returns the Unicode character KeyboardEvent
code of the key that triggered
the onkeypress event, or the
Unicode key code of the key
that triggered the onkeydown or
onkeyup event
view Returns a reference to the UiEvent
Window object where the event
occurred