305 Web Design[Unit 3 Overview of JavaScript][event]
3.6.3.1 Mouse Event
1. onclick()
Fires on a mouse click on the element
1
Prepare by: Divyesh Maisuriya
305 Web Design[Unit 3 Overview of JavaScript][event]
2. ondbclick()
Fires on a mouse double-click on the element
2
Prepare by: Divyesh Maisuriya
305 Web Design[Unit 3 Overview of JavaScript][event]
3. onmousemove()
Fires when the mouse pointer is moving while it
is over an element
3
Prepare by: Divyesh Maisuriya
305 Web Design[Unit 3 Overview of JavaScript][event]
4. onmouseover() and onmouseout()
Fires when the mouse pointer moves over an
element
4
Prepare by: Divyesh Maisuriya
305 Web Design[Unit 3 Overview of JavaScript][event]
5. onmouseup() : A mouse button is pressed over an element
6.onmousedown() : The mouse button is released over an element
5
Prepare by: Divyesh Maisuriya
305 Web Design[Unit 3 Overview of JavaScript][event]
3.6.3.2 : Keyboard Event
Onkeydown()
Fires when a user is pressing a key
6
Prepare by: Divyesh Maisuriya
305 Web Design[Unit 3 Overview of JavaScript][event]
Onkeyup()
Fires when a user releases a key
7
Prepare by: Divyesh Maisuriya
305 Web Design[Unit 3 Overview of JavaScript][event]
Onkeypress()
Fires when a user presses a key
8
Prepare by: Divyesh Maisuriya
305 Web Design[Unit 3 Overview of JavaScript][event]
3.6.3.2 Form Event
1. onsubmit()
9
Prepare by: Divyesh Maisuriya
305 Web Design[Unit 3 Overview of JavaScript][event]
2.onreset()
2. onblur()
The onblur attribute fires the moment that the element loses focus.
Onblur is most often used with form validation code (e.g. when the user
leaves a form field).
Tip: The onblur attribute is the opposite of the onfocus attribute.
10
Prepare by: Divyesh Maisuriya
305 Web Design[Unit 3 Overview of JavaScript][event]
4.onfocus()
The onfocus attribute fires the moment that the element gets focus.
Onfocus is most often used with <input>, <select>, and <a>.
Tip: The onfocus attribute is the opposite of the onblur attribute.
5.
onchange()
The onchange attribute fires the moment when the value of the element is
changed.
Tip: This event is similar to the oninput event. The difference is that the
oninput event occurs immediately after the value of an element has changed,
while onchange occurs when the element loses focus. The other difference is
that the onchange event also works on <select> elements.
11
Prepare by: Divyesh Maisuriya
305 Web Design[Unit 3 Overview of JavaScript][event]
6. onselect()
12
Prepare by: Divyesh Maisuriya