INPUT: Attributes | WebReference

INPUT: Attributes

INPUT:
Attributes


ACCEPT

Value(s)

CDATA

Default Value

#IMPLIED

ACCESSKEY

Value(s)

CDATA

Default Value

#IMPLIED

ALIGN

Valid for `TYPE=IMAGE'. Behaves the same as the ALIGN attribute for the <IMG> element.

Value(s)

Default Value

#IMPLIED

ALT

Value(s)

CDATA

Default Value

#IMPLIED

CHECKED

Indicates that the initial state is on for CHECKBOX or RADIO input types.

Value(s)

checked

Default Value

#IMPLIED

CLASS

Value(s)

CDATA

Default Value

#IMPLIED

DIR

Value(s)

Default Value

#IMPLIED

DISABLED

When present indicates that this field is temporarily disabled. Browsers should show this by "greying it" out in some manner.

Value(s)

disabled

Default Value

#IMPLIED

ID

Value(s)

ID

Default Value

#IMPLIED

ISMAP

Value(s)

ismap

Default Value

#IMPLIED

LANG

Value(s)

NAME

Default Value

#IMPLIED

MAXLENGTH

Constrains the number of characters that can be entered into a text input field. If the value of MAXLENGTH is greater the the value of the SIZE attribute, the field should scroll appropriately. The default number of characters is unlimited.

Value(s)

NUMBER

Default Value

#IMPLIED

NAME

Name for the form field corresponding to this element.

Value(s)

CDATA

Default Value

#IMPLIED

ONBLUR

Value(s)

CDATA

Default Value

#IMPLIED

ONCHANGE

Value(s)

CDATA

Default Value

#IMPLIED

ONCLICK

Value(s)

CDATA

Default Value

#IMPLIED

ONDBLCLICK

Value(s)

CDATA

Default Value

#IMPLIED

ONFOCUS

Value(s)

CDATA

Default Value

#IMPLIED

ONKEYDOWN

Value(s)

CDATA

Default Value

#IMPLIED

ONKEYPRESS

Value(s)

CDATA

Default Value

#IMPLIED

ONKEYUP

Value(s)

CDATA

Default Value

#IMPLIED

ONMOUSEDOWN

Value(s)

CDATA

Default Value

#IMPLIED

ONMOUSEMOVE

Value(s)

CDATA

Default Value

#IMPLIED

ONMOUSEOUT

Value(s)

CDATA

Default Value

#IMPLIED

ONMOUSEOVER

Value(s)

CDATA

Default Value

#IMPLIED

ONMOUSEUP

Value(s)

CDATA

Default Value

#IMPLIED

ONSELECT

Value(s)

CDATA

Default Value

#IMPLIED

READONLY

Value(s)

readonly

Default Value

#IMPLIED

SIZE

Specifies the amount of display space allocated to this input field according to its type. The default depends on the user agent.

Value(s)

CDATA

Default Value

#IMPLIED

SRC

Valid for `TYPE=IMAGE'. Attribute the same as the SRC attribute for the <IMG> element.

Value(s)

CDATA

Default Value

#IMPLIED

STYLE

Value(s)

CDATA

Default Value

#IMPLIED

TABINDEX

Value(s)

NUMBER

Default Value

#IMPLIED

TITLE

Value(s)

CDATA

Default Value

#IMPLIED

TYPE

Defines the type of data the field accepts. Defaults to free text. Several types of fields can be defined with the type attribute:
CHECKBOX
Represents a boolean choice. A set of such elements with the same name represents an n-of-many choice field.

Example:

  <p>What flavors do you like?
  <input type=checkbox name=flavor value=vanilla>Vanilla<br>
  <input type=checkbox name=flavor value=strawberry>Strawberry<br>
  <input type=checkbox name=flavor value=chocolate checked>Chocolate<br>
HIDDEN
Represents a hidden field. The user does not interact with this field; instead, the VALUE attribute specifies the value of the field. The NAME and VALUE attributes are required.

Example:

    <input type=hidden name=context value="l2k3j4l2k3j4l2k3j4lk23">
IMAGE
Specifies an image resource to display, and allows input of two form fields: the x and y coordinate of a pixel chosen from the image. The names of the fields are the name of the field with `.x' and `.y' appended. `TYPE=IMAGE' implies `TYPE=SUBMIT' processing; that is, when a pixel is chosen, the form as a whole is submitted.

Example

    <p>Choose a point on the map:
    <input type=image name=point src="map.gif">
PASSWORD
A text field where the value is obscured as it is entered.

Example:

    <p>Name: <input name=login> Password: <input type=password name=passwd>
RADIO
Represents a boolean choice. A set of such elements with the same name represents a 1-of-many choice field.

Example:

    <p>Which is your favorite?
    <input type=radio name=flavor value=vanilla>Vanilla<br>
    <input type=radio name=flavor value=strawberry>Strawberry<br>
    <input type=radio name=flavor value=chocolate>Chocolate<br>
RESET
Represents an input option, typically a button, that instructs the user agent to reset the form's fields to their initial states. The VALUE attribute, if present, indicates a label for the input (button).
SUBMIT
Represents an input option, typically a button, that instructs the user agent to submit the form.
TEXT
Indicates a single line text entry field.

Example:

<p>Street Address: <input name=street><br>
Postal City code: <input name=city size=16 maxlength=16><br>
Zip Code: <input name=zip size=10 maxlength=10 value="99999-9999"><br>

Value(s)

Default Value

TEXT

USEMAP

Value(s)

CDATA

Default Value

#IMPLIED

VALUE

The initial value of the field, or the value when checked for checkboxes and radio buttons.

Value(s)

CDATA

Default Value

#IMPLIED
Back to INPUT


loose DTD