← 4.10.7.2 Common input element attributesTable of contents4.10.8 The button element →
4.10.7.3 Common input element APIs
input . value [ = value ]

Returns the current value of the form control.

Can be set, to change the value.

Throws an InvalidStateError exception if it is set to any value other than the empty string when the control is a file upload control.

input . checked [ = value ]

Returns the current checkedness of the form control.

Can be set, to change the checkedness.

input . files

Returns a FileList object listing the selected files of the form control.

Returns null if the control isn't a file control.

input . valueAsDate [ = value ]

Returns a Date object representing the form control's value, if applicable; otherwise, returns null.

Can be set, to change the value.

Throws an InvalidStateError exception if the control isn't date- or time-based.

input . valueAsNumber [ = value ]

Returns a number representing the form control's value, if applicable; otherwise, returns NaN.

Can be set, to change the value.

Throws an InvalidStateError exception if the control is neither date- or time-based nor numeric.

input . stepUp( [ n ] )
input . stepDown( [ n ] )

Changes the form control's value by the value given in the step attribute, multiplied by n. The default value for n is 1.

Throws InvalidStateError exception if the control is neither date- or time-based nor numeric, if the step attribute's value is "any", if the current value could not be parsed, or if stepping in the given direction by the given amount would take the value out of range.

input . list

Returns the datalist element indicated by the list attribute.