|
HTML Attribute for <INPUT ...>
VALUE
VALUE sets the value for the input field. VALUE sets the default values for text and
password fields, sets the button text in submit, reset and plain buttons, sets the values of the choices in radio buttons, sets the permanent values of hidden fields, and has no effect on file, and image fields.
- text and password fields
- For these types of fields,
VALUE sets the default value:
It's a bad idea to send a default password, because the password can be obtained by
looking at the HTML code.
- radio buttons
- use different values among several inputs with the same
NAME to indicate different options:
- submit,
reset, and
plain buttons
- The text in these types of buttons is set using
VALUE.
If you can use the NAME attribute with submit buttons to make them act similar to
radio buttons:
See RADIO for more details.
- checkboxes
VALUE does not effect the checked state of checkboxes. If you want a checkbox to default to on, use CHECKED. Instead, VALUE sets the value that is sent to the server if the user checks that checkbox. For example, if you wanted the checkbox to send
yessireebob you could set the checkbox like this:
If the checkbox is not checked, no value of any kind is sent to the server. By default, checkboxes send on.
- hidden fields
- Hidden fields have no purpose unless they have a value
(they also need a name).
<INPUT SIZE="..."> >
|