tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Interviews | Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 jQuery > Basic > Onload Events

Onload Events 

This example shows two ways of defining on page load event. The callback function gets invoked as soon as the page is loaded. The second one is short notation of first one.

File Name  :  
source/JQUERY/basic/onload.html 
Author  :  Sudhakar KV
Email  :  kvenkatasudhakar@gmail.com
01<html>
02 <head>
03 <script type="text/javascript" src="js/jquery.js"></script>
04 <script type="text/javascript">
05// Document is ready
06 
07//Type1
08 $(document).ready(function() {
09    alert("Page Loaded..1");
10 });
11 
12//Type2
13$(function(){
14    alert("Page Loaded..2");
15});
16 
17 </script>
18 </head>
19 <body>
20    TEST
21 </body>
22 </html>




 
  


  
bl  br