Interface

HTMLInputElement

HTMLInputElement

Provides special properties and methods for manipulating the options, layout, and presentation of elements.

View Source js/lib.dom.d.ts, line 2689

Members

string

# accept

Sets or retrieves a comma-separated list of content types.

View Source js/lib.dom.d.ts, line 2692

string

# align

Sets or retrieves how the object is aligned with adjacent text.

View Source js/lib.dom.d.ts, line 2697

string

# alt

Sets or retrieves a text alternative to the graphic.

View Source js/lib.dom.d.ts, line 2702

string

# autocomplete

Specifies whether autocomplete is applied to an editable text field.

View Source js/lib.dom.d.ts, line 2707

boolean

# checked

Sets or retrieves the state of the check box or radio button.

View Source js/lib.dom.d.ts, line 2712

boolean

# checkValidity

Returns whether a form will validate when it is submitted, without having to submit it.

View Source js/lib.dom.d.ts, line 2877

boolean

# defaultChecked

Sets or retrieves the state of the check box or radio button.

View Source js/lib.dom.d.ts, line 2717

string

# defaultValue

Sets or retrieves the initial contents of the object.

View Source js/lib.dom.d.ts, line 2722

FileList | null

# files

Returns a FileList object on a file type input object.

View Source js/lib.dom.d.ts, line 2727

HTMLFormElement | null

# form

Retrieves a reference to the form that the object is embedded in.

View Source js/lib.dom.d.ts, line 2732

string

# formAction

Overrides the action attribute (where the data on a form is sent) on the parent form element.

View Source js/lib.dom.d.ts, line 2737

string

# formEnctype

Used to override the encoding (formEnctype attribute) specified on the form element.

View Source js/lib.dom.d.ts, line 2742

string

# formMethod

Overrides the submit method attribute previously specified on a form element.

View Source js/lib.dom.d.ts, line 2747

boolean

# formNoValidate

Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.

View Source js/lib.dom.d.ts, line 2752

string

# formTarget

Overrides the target attribute on a form element.

View Source js/lib.dom.d.ts, line 2757

number

# height

Sets or retrieves the height of the object.

View Source js/lib.dom.d.ts, line 2762

HTMLElement | null

# list

Specifies the ID of a pre-defined datalist of options for an input element.

View Source js/lib.dom.d.ts, line 2767

string

# max

Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field.

View Source js/lib.dom.d.ts, line 2772

number

# maxLength

Sets or retrieves the maximum number of characters that the user can enter in a text control.

View Source js/lib.dom.d.ts, line 2777

string

# min

Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field.

View Source js/lib.dom.d.ts, line 2782

boolean

# multiple

Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.

View Source js/lib.dom.d.ts, line 2787

string

# name

Sets or retrieves the name of the object.

View Source js/lib.dom.d.ts, line 2792

string

# pattern

Gets or sets a string containing a regular expression that the user's input must match.

View Source js/lib.dom.d.ts, line 2797

string

# placeholder

Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.

View Source js/lib.dom.d.ts, line 2802

boolean

# required

When present, marks an element that can't be submitted without a value.

View Source js/lib.dom.d.ts, line 2807

void

# select

Makes the selection equal to the current object.

View Source js/lib.dom.d.ts, line 2882

number | null

# selectionEnd

Gets or sets the end position or offset of a text selection.

View Source js/lib.dom.d.ts, line 2812

number | null

# selectionStart

Gets or sets the starting position or offset of a text selection.

View Source js/lib.dom.d.ts, line 2817

void

# setCustomValidity

Sets a custom error message that is displayed when a form is submitted.

View Source js/lib.dom.d.ts, line 2887

void

# setSelectionRange

Sets the start and end positions of a selection in a text field.

View Source js/lib.dom.d.ts, line 2893

string

# src

The address or URL of the a media resource that is to be considered.

View Source js/lib.dom.d.ts, line 2822

string

# step

Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field.

View Source js/lib.dom.d.ts, line 2827

void

# stepDown

Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.

View Source js/lib.dom.d.ts, line 2901

void

# stepUp

Increments a range input control's value by the value given by the Step attribute. If the optional parameter is used, will increment the input control's value by that value.

View Source js/lib.dom.d.ts, line 2907

string

# type

Returns the content type of the object.

View Source js/lib.dom.d.ts, line 2832

string

# useMap

Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.

View Source js/lib.dom.d.ts, line 2837

string

# validationMessage

Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.

View Source js/lib.dom.d.ts, line 2842

ValidityState

# validity

Returns a ValidityState object that represents the validity states of an element.

View Source js/lib.dom.d.ts, line 2847

string

# value

Returns the value of the data at the cursor's current position.

View Source js/lib.dom.d.ts, line 2852

Date | null

# valueAsDate

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" DOMException if the control isn't date- or time-based.

View Source js/lib.dom.d.ts, line 2857

number

# valueAsNumber

Returns the input field value as a number.

View Source js/lib.dom.d.ts, line 2862

number

# width

Sets or retrieves the width of the object.

View Source js/lib.dom.d.ts, line 2867

boolean

# willValidate

Returns whether an element will successfully validate based on forms validation rules and constraints.

View Source js/lib.dom.d.ts, line 2872