www.pickatutorial.com Computer Tutorials
Top eBooks: C/C++ | C# | Android | Mathematics | Database | Cloud | Graphics | Networking | Oracle | Hardware | AI
Top Tutorials: C/C++ | C#.NET | PHP MySQL | Java | Java Script | jQuery | HTML | xHTML | HTML5 | VB Script| CSS
Lessons JavaScript Events Bookmark and Share
Tutorial Home
Lesson 1
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Lesson 6
Lesson 7
Lesson 8
Lesson 9
Lesson 10
Lesson 11
Lesson 12
Lesson 13
Lesson 14
Lesson 15
Lesson 16
Lesson 17
Lesson 18
Lesson 19
Lesson 20
Lesson 21
Lesson 22
Lesson 23
Lesson 24
Lesson 25
Lesson 26
Lesson 27
Lesson 28
Lesson 29
Lesson 30
Lesson 31
Lesson 32
Lesson 33
Lesson 34
Lesson 35
Lesson 36
Lesson 37
Lesson 38
Lesson 39
Lesson 40
Lesson 41
Lesson 42
Lesson 43
Lesson 44
Lesson 45
Lesson 46
Lesson 47
Lesson 48
Lesson 49

Events are the actions or the happening of something on the machine and in the environment where the program executes e.g.;

the submission of a web form,
clicking of a button,
focusing an element,
hovering mouse over something, etc.

All the above actions or happenings are automatically detected by the JavaScript and then passed on to our programs.

Almost Every element on a web page has certain events associated with it that can trigger some predefined JavaScript code, usually in the form of a function. onClick event is a common example of a button event that is triggered when a user clicks a button.

We can associate a JavaScript function to a button to be automatically called whenever the button is clicked. The events are defined in the HTML tags.

Some common examples of JavaScript events include:

  • A mouse click
  • A web page / image loading
  • Mouse hovering over a button / image / link
  • A button press on the keyboard
  • Submission of an HTML form

In the coming lessons we will learn to use common JavaScript events and their handling.


Next >>> Lesson No. 25: onLoad and onUnload





Home - Advertise - Contact - Disclaimer - About Us
© Since 2006 pickatutorial.com -- All Rights Reserved.