Event.SUBMIT

JavaScript 1.0+, JScript 1.0+ Nav2+, IE 3+, Opera3+ Syntax

Event.SUBMIT

Description

The SUBMIT property of the Event object is used solely by forms to indicate the clicking of the Submit button.

Example

Listing 7.238 shows an example of how JavaScript can be used to process a form when the Submit button is clicked. The Window listens for the SUBMIT event. When captured,it will call the handle() function. This function informs the user that the Submit button was clicked.

Listing 7.238 Example of Using the SUBMIT Property
 <html> <head> <title>Example of Event.SUBMIT</title> </head> <body> <script language="JavaScript"> <!--Hide // sets up the window to capture SUBMIT events window.captureEvents(Event.SUBMIT); // function ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.