August 1999
Intermediate to advanced
1488 pages
72h 53m
English
submit.name
The name property of an instance of a Submit object returns the name of the submit button. This property is often accessed via the elements array of a Form object and used to return the name of the button. It is most useful when there are many forms on a given page, and determining the name helps you determine what function you want to perform.
Listing 7.485 has a single text box and submit button. The elements array of a Form object is used to retrieve the name and display it in an alert box.
<html> <head> <script language="JavaScript"> <!-- Hide // Display ... |
Read now
Unlock full access