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)
- top
- middle
- bottom
- left
- right
Default Value
#IMPLIEDALT
Value(s)
CDATA
Default Value
#IMPLIEDCHECKED
Indicates that the initial state is on for CHECKBOX or RADIO input types.
Value(s)
checkedDefault Value
#IMPLIEDCLASS
Value(s)
CDATA
Default Value
#IMPLIEDDIR
Value(s)
- ltr
- rtl
Default Value
#IMPLIEDDISABLED
When present indicates that this field is temporarily disabled. Browsers should show this by "greying it" out in some manner.
Value(s)
disabledDefault Value
#IMPLIEDID
Value(s)
ID
Default Value
#IMPLIEDISMAP
Value(s)
ismapDefault Value
#IMPLIEDLANG
Value(s)
NAME
Default Value
#IMPLIEDMAXLENGTH
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
#IMPLIEDNAME
Name for the form field corresponding to this element.
Value(s)
CDATA
Default Value
#IMPLIEDONBLUR
Value(s)
CDATA
Default Value
#IMPLIEDONCHANGE
Value(s)
CDATA
Default Value
#IMPLIEDONCLICK
Value(s)
CDATA
Default Value
#IMPLIEDONDBLCLICK
Value(s)
CDATA
Default Value
#IMPLIEDONFOCUS
Value(s)
CDATA
Default Value
#IMPLIEDONKEYDOWN
Value(s)
CDATA
Default Value
#IMPLIEDONKEYPRESS
Value(s)
CDATA
Default Value
#IMPLIEDONKEYUP
Value(s)
CDATA
Default Value
#IMPLIEDONMOUSEDOWN
Value(s)
CDATA
Default Value
#IMPLIEDONMOUSEMOVE
Value(s)
CDATA
Default Value
#IMPLIEDONMOUSEOUT
Value(s)
CDATA
Default Value
#IMPLIEDONMOUSEOVER
Value(s)
CDATA
Default Value
#IMPLIEDONMOUSEUP
Value(s)
CDATA
Default Value
#IMPLIEDONSELECT
Value(s)
CDATA
Default Value
#IMPLIEDREADONLY
Value(s)
readonlyDefault Value
#IMPLIEDSIZE
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
#IMPLIEDSRC
Valid for `TYPE=IMAGE'. Attribute the same as the SRC attribute for the <IMG> element.
Value(s)
CDATA
Default Value
#IMPLIEDSTYLE
Value(s)
CDATA
Default Value
#IMPLIEDTABINDEX
Value(s)
NUMBER
Default Value
#IMPLIEDTITLE
Value(s)
CDATA
Default Value
#IMPLIEDTYPE
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)
- TEXT
- PASSWORD
- CHECKBOX
- RADIO
- SUBMIT
- RESET
- FILE
- HIDDEN
- IMAGE
- BUTTON
Default Value
TEXTUSEMAP
Value(s)
CDATA
Default Value
#IMPLIEDVALUE
The initial value of the field, or the value when checked for checkboxes and radio buttons.
Value(s)
CDATA
Default Value
#IMPLIEDBack to INPUT
loose DTD