<input>

line.gif

Syntax

<input type=value name=value align=value
       checked maxlength=n size=n src=url value=init_value>

Attributes

type Specifies the type of the control (see table below).
name The name of the field.
align When the field type is image, this attribute defines how the following line of text will be aligned with respect to the image. Possible values are top, middle and bottom.
checked When the field type is a check box or radio button this attribute causes the button to be initially selected. This attribute is useful for setting default values.
maxlength Sets the maximum number of characters that may be entered into a text box.
size Determines the maximum number of viewable characters in a text box. If the number of characters entered into a text field exceeds this value then the data is scrolled.
src When type is image this attribute specifies the url of the image.
value The default value for the input field. Unless replaced by the user, this value is passed to the server upon form submission. For checkboxes, this is the value passed to the server (and displayed on the checkbox).


Values for the Type Attribute of the Input Tag
button The input field is a pushbutton. The value is the name of the pushbutton.
checkbox The input field consists of a number of checkboxes. Each checkbox has the same name and a selected checkbox will generate a unique name/value pair. The default value is 'on'.
hidden The input field is not visible; however, a name/value pair will be generated and submitted along with the rest of the form data.
image An image that is clickable is included in the form. When selected, the image causes the form to be submitted. The coordinates of the selected point on the image are included in the data that is submitted.
password A text input field (see below) is generated; however, the text therein is displayed as bullets. No encryption is performed upon the data entered in the field.
radio Provides a number of alternatives, only one of which is selectable. Only the selected radio button sends a name/value pair. Each button should be given the same name.
reset A button that resets all fields in the form to their default values. Setting the value attribute for a reset field alters the label on the button.
submit A button that submits the form to the server. Setting the value attribute for a submit field alters the label on the button. If a name attribute is explicitly specified then a name/value pair for the field is included in the data that is sent; otherwise, the form data does not include a name/value pair for this field.
text A single line entry field for text. The size and maxline attributes may be used to control the size of the field and the size of text enterable into the field (respectively).


Notes