INPUT tag is used to specify a simple input element
inside a FORM. It is a standalone tag; it does not
surround anything and there is no terminating tag -- i.e., it is used
in much the same way as IMG.
The attributes to INPUT are as follows:
TYPE must be one of:
NAME are grouped into
"one of many" behavior.
NAME is the symbolic name, not a displayed name,
for this input field.
This must be present for all types but "submit" and
"reset", as it is used when putting together the query string
that gets sent to the remote server when the filled-out form is
submitted.
VALUE, for a text or password entry field, can be
used to specify the default contents of the field. For a
checkbox or a radio button, VALUE specifies the
value of the button when it is checked (unchecked
checkboxes are disregarded when submitting queries); the default
value for a checkbox or radio button is "on".
For types "submit" and "reset", VALUE can be used to
specify the label for the pushbutton.
CHECKED (no value needed) specifies that this
checkbox or radio button is checked by default; this is only
appropriate for checkboxes and radio buttons.
SIZE is the physical size of the input field in
characters; this is only appropriate for text entry fields and
password entry fields. If this is not present, the default is
20.
MAXLENGTH is the maximum number of characters that
are accepted as input; this is only appropriate for text entry
fields and password entry fields. If this is not present, the
default will be unlimited. The text entry field is assumed to scroll appropriately
if MAXLENGTH is greater than SIZE.
<INPUT TYPE="text" NAME="entry1"> | |
<INPUT TYPE="text" VALUE="Hello there!" NAME="entry2"> | |
<INPUT TYPE="text" VALUE="Short one" SIZE=10 NAME="entry3"> |
<INPUT TYPE="password" NAME="ex1"> | |
<INPUT TYPE="password" VALUE="Hello there!" NAME="ex2"> | |
<INPUT TYPE="password" VALUE="Short one" SIZE=10 NAME="ex3"> |
<INPUT TYPE="checkbox" VALUE="box1" NAME="ex1"> | |
<INPUT TYPE="checkbox" NAME="ex2" VALUE="box2" CHECKED> |
<INPUT TYPE="radio" VALUE="box1" NAME="ex1"> | |
<INPUT TYPE="radio" NAME="ex2" VALUE="box2" CHECKED> |
<INPUT TYPE="submit" VALUE="Send!"> | |
<INPUT TYPE="reset" VALUE="Reject!"> |
