Interface

HTMLButtonElement

HTMLButtonElement

Provides properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating

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

Members

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 2211

HTMLFormElement | null

# form

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

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

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 2156

string

# formEnctype

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

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

string

# formMethod

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

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

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 2171

string

# formTarget

Overrides the target attribute on a form element.

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

string

# name

Sets or retrieves the name of the object.

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

void

# setCustomValidity

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

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

string

# type

Gets the classification and default behavior of the button.

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

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 2191

ValidityState

# validity

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

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

string

# value

Sets or retrieves the default or selected value of the control.

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

boolean

# willValidate

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

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