August 1999
Intermediate to advanced
1488 pages
72h 53m
English
document.form. button.value
The value property provides access to the VALUE attribute of the button. This property is a read-only string that is displayed in the graphical button.
Listing 7.34 uses the value property to customize the text in a button. To modify the button value, enter your name into the text field and then click the Customize the Button button. The button at the bottom of the document will no longer contain just the word "Press".
<html> <h2>Customize the Button</h2> <form name="myForm"> Please enter your name: <input type="text" name="nameBox"> <input type="button" ... |
Read now
Unlock full access