Table of Contents
Back Button
Back to Chapter
Control Statements
No items found.
Function & Events
No items found.
Array and its Types
No items found.
OOP : Object Oriented Programming
No items found.
Javascript Standards
No items found.
HTML DOM
No items found.
Javascript : Advanced 1
No items found.
Javascript : Advanced 2
No items found.
Additional JavaScript
No items found.

Events

Introduction

We can execute javascript code on the occurrence of an event. For Ex: When a user clicks on the Button the Javascript code should be executed so Here, User Click is an Event

There are many more Events:

  1. When a user clicks the mouse
  2. When a web page has loaded
  3. When an image has been loaded
  4. When the mouse moves over an element
  5. When an input field is changed
  6. When an HTML form is submitted
  7. When a user strokes a key

How to Execute Code on Event Occur

Syntax

Example

Hello Guys!!!

Here,

When a user clicks on the Paragraph i.e. "Hello Guys!!!" Its text gets changed to "Welcome to the World of JS"

Let's Go Deep into Events.

Events List

Ask queries
Contact Us on Whatsapp
Hi, How Can We Help You?