input
form control
INPUT Tag#
form control Attributes are:
| Attribute | Description | Default Value | Values | Required |
|---|---|---|---|---|
| accesskey | accessibility key character | no | ||
| tabindex | position in tabbing order | no | ||
| onfocus | the element got the focus | no | ||
| onblur | the element lost the focus | no | ||
| type | text | no | ||
| name | no | |||
| value | no | |||
| checked | checked | no | ||
| disabled | disabled | no | ||
| readonly | readonly | no | ||
| size | no | |||
| maxlength | one or more digits | no | ||
| src | a Uniform Resource Identifier, see [RFC2396](http://www.ietf.org/rfc/rfc2396.txt) | no | ||
| alt | no | |||
| usemap | a Uniform Resource Identifier, see [RFC2396](http://www.ietf.org/rfc/rfc2396.txt) | no | ||
| onselect | script expression | no | ||
| onchange | script expression | no | ||
| accept | comma-separated list of media types, as per [RFC2045](http://www.ietf.org/rfc/rfc2045.txt) | no |
Example:
<input
accesskey=""
tabindex=""
onfocus=""
onblur=""
type="text"
name=""
value=""
checked=""
disabled=""
readonly=""
size=""
maxlength=""
src=""
alt=""
usemap=""
onselect=""
onchange=""
accept=""
>
</input>##Events##
| Event | Description |
|---|---|
| onclick | The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. |
| ondblclick | The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. |
| onmousedown | The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. |
| onmouseup | The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. |
| onmouseover | The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. |
| onmousemove | The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. |
| onmouseout | The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. |
| onblur | The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus. |
| onkeypress | The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. |
| onkeydown | The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. |
| onkeyup | The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. |
| onselect | The onselect event occurs when a user selects some text in a text field. This attribute may be used with the INPUT and TEXTAREA elements. |
| onchange | The onchange event occurs when a control loses the input focus and its value has been modified since gaining focus. This attribute applies to the following elements: INPUT, SELECT, and TEXTAREA. |