Example of onClick Event Object, JavaScript Tutorial, Global Guide Line Technology.
Forum | Blog |

JavaScript Tutorial Home Page JavaScript Examples >> onClick Event Object Example


Example of onClick Event Object

An Event Handler executes a segment of a code based on certain events occurring within the application, such as onClick Event Handler. In an onClick Event Handler, JavaScript function is called when an object in a button (regular, radio, reset and submit) is clicked, a link is pushed, a checkbox is checked or an image map area is selected. Except for the regular button and the area, the onClick Event Handler can return false to cancel the action. For example:

<INPUT TYPE="submit" NAME="mysubmit" VALUE="Submit"
onClick="return confirm(`Are you sure you want to submit the form?')">

[ About ] [ Contact ] [ Home ]
[ Links ] [ Site Map ] [ Services ] [ Privacy ]

Copyright 2005 -  2021 www.globalguideline.com All rights reserved. (Best viewed in IE 6.0+ or Firefox 2.0+ at 1024 * 768 or higher) 366 visitors are online now