Availability
Netscape 2; buggy in Internet Explorer 3
Synopsis
input.valueDescription
value is a read/write string property of all form
elements that specifies the value displayed by the form element
and/or submitted for the element when the form is submitted. The
value property of the Text element, for example,
is the user's input, which is also the value submitted with the
form. For the Checkbox object, on the other hand, the
value property specifies a string that is not
displayed but is submitted with the form if the Checkbox element is
checked when the form is submitted.
The initial value of the value property is
specified by the value attribute of the HTML tag
that defines the form element.
For Button, Submit, and Reset objects, the value
property specifies the text that appears within the button. On some
platforms, changing the value property of these
elements actually changes the text displayed by the buttons onscreen.
This does not work on all platforms, however, and is not an advisable
technique. Changing the label of a button may change the size of the
button, causing it to overlap and obscure other portions of the
document.
The Select element has a value property, like all
form elements, but does not use it. Instead, the value submitted by
this element is specified by the value property of
the Option objects it contains.
For security reasons, the value property of the
FileUpload element is read-only.
•
Table of Contents
•
Index
•
Reviews
•
Examples
•
Reader Reviews
•
Errata
JavaScript: The Definitive Guide, 4th Edition
By
David Flanagan
Publisher
: O'Reilly
Pub Date
: November 2001
ISBN
: 0-596-00048-0
Pages
: 936
Slots
: 1
This fourth edition of the definitive reference to
JavaScript, a scripting language that can be embedded
directly in web pages, covers the latest version of the
language, JavaScript 1.5, as supported by Netscape 6 and
Internet Explorer 6. The book also provides complete
coverage of the W3C DOM standard (Level 1 and Level 2),
while retaining material on the legacy Level 0 DOM for
backward compatibility.