August 1999
Intermediate to advanced
1488 pages
72h 53m
English
submit.value
The value property of an instance of a Submit object returns the current value of the submit button. This value is what is displayed on the button itself.
Listing 7.490 contains a text box and button. When a user clicks the submit button, an alert box pops up displaying the value of this instance.
<html> <head> <script language="JavaScript1.1"> <!-- Hide // Display an alert box that contains the value of the // submit button. function getValue(){ alert("The value of this submit button is " + document.myForm.elements[1].value); } // End hide ---> </script> </head> <body> <form name="myForm"> ... |
Read now
Unlock full access