Events in JavaScript

We will discuss various events in JavaScript and associated triggers with example. Some practical examples we will develop through demo of these scripts.
Mouse EffectDescription
onMouseover & onMouseoutchange the background color of row or swap images on Mouseover
onMousedown & onMouseupEvents triggered when Mouse is clicked and when it is released.
onMousemoveWhen mouse is moved over the elements this event is triggered
Hide/showDisplay of Layer with onClick event of button
onClickText box click event
onClickOnClick event of period button
onClickSelecting all the data of inside textarea by clicking
CounterCounting the characters dynamically inside a textarea and setting a limit
onbluronBlur event when focus moves out or on lost focus
ondblClickManaging both Single and Double click events
onBlurShowing help text by using onfocus and onBlur event triggers
Copy DataCopying a set of textbox entered data to another area of a form
Copy ListboxCopying data along with drop down list box selection inside a form
Keyboard EventsDescription
onKeyPressWhile pressing a key the event to trigger
onKeyDownEvents to trigger whle a key is down
onKeyUpEvents to trigger on release of a key on keyboard
MessageShowing Help message on mouseover using Div tag
MessageHide and displaying layers through radio buttons
Message Status bar Message on Mouseover event of a link
Progress bar
Progress bar value attributes by button click
Arrow Key Detecting arrow key press event
Key event Detecting key pressed by user
Keyboard Virtual keyboard : Detecting key pressed based on screen location
clientX and clientYclientX and clientY to get horizontal and vertical coordinates

OnFocus Event

We can trigger events when we focus on any form component like textbox, radio button , checkbox etc. This can be achieved by shifting crusher to the component or by moving it by using tab , we can click on the component and keep the focus on it.

onunload event

We can display a message or trigger some script when visitor exit the page or closes the browser tab.

Subscribe to our YouTube Channel here


* indicates required
Subscribe to plus2net

    Post your comments , suggestion , error , requirements etc here

    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 All rights reserved worldwide Privacy Policy Disclaimer