August 1999
Intermediate to advanced
1488 pages
72h 53m
English
text.defaultValue
The defaultValue property of a Text object instance contains the default value specified by the VALUE attribute of the <input> tag. This property is often used to reset forms to their default values after a user has entered some data.
Listing 7.494 has a text box and a button. If the user edits some of the text in the box and then clicks the Click to Reset button, the text will change back to the default value.
<html> <head> <script language="JavaScript"> <!-- Hide // Define the resetForm function called by pressing the button ... |
Read now
Unlock full access