August 1999
Intermediate to advanced
1488 pages
72h 53m
English
submit.type
The type property of an instance of a Submit object returns the type of the text box. This always returns submit.
Listing 7.489 has a text box and a submit button. When the button is clicked, an alert box is popped up that displays the type property of the submit button.
<html> <head> <script language="JavaScript1.1"> <!-- Hide // Display an alert box that contains the type of the // submit button. function getType(){ alert("The name of this submit button is " + document.myForm.elements[1].type); } // End hide ---> </script> </head> <body> <form name="myForm"> <input type=TEXT ... |
Read now
Unlock full access