php-mysql tutorial

Designed By NISHANT GUPTA

  • Home
  • PHP
  • HTML
  • CSS
  • JavaScript
  • JQuery
  • Contact-us
  • Learn HTML

    • Introduction of HTML
    • Image Handling in HTML
    • List Handling in HTML
    • Font Handling in HTML
    • Table Handling in HTML
    • Form Handling in HTML
  • Learn CSS

    • Introduction of CSS
    • Styling Background in CSS
    • Styling Text in CSS
    • Styling Font in CSS
    • Styling Link in CSS
    • Styling List in CSS
    • Styling Table in CSS
    • Styling Div in CSS
    • Styling Span in CSS
    • Positioning in CSS
    • Display in CSS
  • Learn JavaScript

    • Introduction of JavaScript
    • Data Type in JavaScript
    • Variable in JavaScript
    • Oprator in JavaScript
    • Cond. Statement in JavaScript
    • Loop in JavaScript
    • Array in JavaScript
    • Function in JavaScript
    • Date in JavaScript
    • String in JavaScript
    • DOM in JavaScript
    • Event Handling in JS
    • Form Handling in JavaScript
  • Learn PHP-MYSQL

    • Introduction of PHP
    • Decision Control in PHP
    • Loop in PHP
    • Array in PHP
    • Function in PHP
    • Form Handling in PHP
    • File Inclusion in PHP

Event Handling in JavaScript

Event Introduction

  1. Events are at the very core of any web application and most JavaScript enhancements.
  2. It’s through these events that we define when something is going to happen.
  3. If we have a button in our document and we need some form validation to take place when it’s clicked then we would use the ‘click’ event.

What Is An Event ?

The building blocks of an interactive web page is the JavaScript event system.

An event in JavaScript is something that happens with or on the webpage.

A few example of events:

  1. A mouse click.

  2. The webpage loading.
  3. Mousing over a hot spot on the webpage, also known as hovering.
  4. Selecting an input box in an HTML form.
  5. A keystroke

What Is Event Handling ?

Whenever an event occurs , JavaScript allows us to execute a piece of code in it’s response.

Such kind of programming is called “EVENT HANDLING” and such codes are called “EVENT HANDLERS”.

For example:

User types something in a textbox for mobile number.

This is  an  EVENT.

A JavaScript code immediately runs and checks whether the typed data is digit or not.

This is EVENT HANDLING.

Event Categories

Before we can design event handling code we must know about types of events .

Overall there are 50 events , but we generally deal with 4 categories of events:

  1. Mouse Event
  2. Key Event
  3. Form Events
  4. General Events

 

Advertisements

 

©  2014 All Rights Reserved  •  Design by >Nishant Gupta.

Privacy Policy • Terms of Use