Javascript Events

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 10

The Islamia University of

Bahawalpur
CSIT

Department Of Computer
Science

Presented By:

WAHEED ANWER
Client-Side and Server-side Programming

Client-side code
Script
JavaScript, JScript – Microsoft
VBScript – Microsoft
Embedded in <script> elements and execute in the browser,
provides immediate feedback to the user.
Reduces the load on a server, reduces network traffic.
Server-side code
Execute on the server
CGI/Perl, ASP, PHP, ColdFusion, JSP
The code remains hidden from users, and browser independent.
Can be combined with good results.
Mouse Events
onclick The event occurs when the user clicks on an element

ondblclick The event occurs when the user double-clicks on an element

onmouseenter The event occurs when the pointer is moved onto an element

onmouseleave The event occurs when the pointer is moved out of an element

onmousemove The event occurs when the pointer is moving while it is over an
element
onmouseover The event occurs when the pointer is moved onto an element, or
onto one of its children
onmouseout The event occurs when a user moves the mouse pointer out of
an element, or out of one of its children
onmousedown The event occurs when the user presses a mouse button over
an element
onmouseup The event occurs when a user releases a mouse button over an
element
Keyboard Events

Attribute Description

onkeydown The event occurs when the user is pressing a key

onkeypress The event occurs when the user presses a key

onkeyup The event occurs when the user releases a key


Frame/Object Events

Attribute Description
The event occurs when an image is stopped from loading
onabort
before completely loaded (for <object>)
The event occurs when an image does not load properly
onerror
(for <object>, <body> and <frameset>)
The event occurs when a document, frameset, or <object>
onload
has been loaded
onresize The event occurs when a document view is resized
onscroll The event occurs when a document view is scrolled
The event occurs once a page has unloaded (for <body>
onunload
and <frameset>)
Form Events

Attribute Description
The event occurs when an element gets focus (for <label>,
onfocus
<input>, <select>, textarea>, and <button>)

onblur The event occurs when a form element loses focus

The event occurs when the content of a form element, the


onchange selection, or the checked state have changed (for <input>,
<select>, and <textarea>)
The event occurs when a user selects some  text (for <input>
onselect
and <textarea>)

onreset The event occurs when a form is reset


onsubmit The event occurs when a form is submitted

You might also like