general events Flashcards
What does the attribute “onmessage” do?
This attribute is generally applied to body tag and is introduced in HTML5. It allows a script to be executed when message is triggered.
Define form event.
Form events are triggered by actions inside a HTML form.
What does a form “onReset” event do?
onReset event runs a script when the user resets the form. It is not supported in HTML5.
How many keyboard events exist in HTML5?
There are only three keyboard events in HTML5.
Name the keyboard events.
onkeydown, onkeypress, onkeyup
What does onkeyup event do?
It is a keyboard event and allows a script to be executed when a key is pressed.
What does onkeypress event do?
It is a keyboard event and allows a script to be executed when a key is pressed and released.
Which keyboard event will you use to execute a script when a key is released?
onkeyup
How many mouse events are there in HTML5?
There are sixteen mouse events in HTML5.
How do you differentiate between onmouseout and onmousewheel events?
Both are mouse events. onmouseout event allows a script to be executed when the mouse pointer moves out of an element whereas onmousewheel event allows a script to be executed when the mouse wheel is being rotated.
Name the mouse events that are introduced in HTML5.
ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onmousewheel, onscroll