Professional Documents
Culture Documents
Javascript Events
Javascript Events
Javascript Events
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
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
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>)