Home arrow JavaScript arrow OnLoad and OnMouse JavaScript Events
JAVASCRIPT

OnLoad and OnMouse JavaScript Events


In our last article we left off with the OnKeyUp function, which is triggered when a user releases a key on the keyboard. We will continue discussing the various JavaScript events in this article, and hopefully finish them in the next tutorial. So grab yourself some coffee and let’s get to work.

Author Info:
By: James Payne
Rating: 3 stars3 stars3 stars3 stars3 stars / 14
December 10, 2007
TABLE OF CONTENTS:
  1. · OnLoad and OnMouse JavaScript Events
  2. · OnMouse Events
  3. · OnMouseMove
  4. · OnMouseOut
  5. · OnMouseOver
  6. · OnMouseUp

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
OnLoad and OnMouse JavaScript Events
(Page 1 of 6 )

But first, let’s preview the beautiful JavaScript Events table again:

 

Event

What Triggers the Event

OnAbort

Occurs when the loading of an image is interrupted

OnBlur

Occurs when an element loses focus

OnChange

Occurs when the user changes the content of a field

OnClick

Occurs when the user clicks an object

OnDblClick

Occurs when the user double clicks an object

OnError

Occurs when an error occurs while loading a document or an image

OnFocus

Occurs when an element has focus

OnKeyDown

Occurs when a keyboard key is pressed

OnKeyPress

Occurs when a keyboard key is pressed or held down

OnKeyUp

Occurs when a keyboard key is released

OnLoad

Occurs when a page or image has completed loading

OnMouseDown

Occurs when a mouse button is pressed

OnMouseMove

Occurs when the mouse is moved

OnMouseOut

Occurs when the mouse is moved off of an element

OnMouseOver

Occurs when the mouse is moved over an element

OnMouseUp

Occurs when the mouse button is released

OnReset

Occurs when the reset button is clicked

OnResize

Occurs when a window or frame is resized.

OnSelect

Occurs when text is selected

OnSubmit

Occurs when the submit button is clicked

OnUnload

Occurs when the user exits the page

OnLoad

The OnLoad event occurs when either the page or an image is loaded. In the example below, once the page loads we create a pop-up box telling the user that the page has loaded.

<html>

<head>

<script type="text/javascript">

function pageloads()

{

alert ('The page has loaded.')

}

</script>

</head>

<body onload="pageloads()">

</body>

</html>

Supporting HTML tags: <body>, <frame>, <frameset>, <iframe>, <img>, <link>, <script>

Supporting Javascript Objects: image, layer, window


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Tutorials for Beginners
- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 6 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials