HTMLFormElement
A element in the DOM; it allows access to and in some cases modification of aspects of the form, as well as access to its component elements.
interface HTMLFormElement extends HTMLElement {
[index: number]: Element;
[name: string]: any;
acceptCharset: string;
action: string;
autocomplete: string;
readonly elements: HTMLFormControlsCollection;
encoding: string;
enctype: string;
readonly length: number;
method: string;
name: string;
noValidate: boolean;
target: string;
[[Symbol.iterator]](): IterableIterator<Element>;
addEventListener<K extends keyof HTMLElementEventMap>(
type: K,
listener: (this: HTMLFormElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void;checkValidity(): boolean;
removeEventListener<K extends keyof HTMLElementEventMap>(
type: K,
listener: (this: HTMLFormElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;removeEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;reportValidity(): boolean;
requestSubmit(submitter?: HTMLElement | null): void;
reset(): void;
submit(): void;
}var HTMLFormElement: {
prototype: HTMLFormElement;
new (): HTMLFormElement;
};§Extends
§Properties
§
acceptCharset: string
[src]Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form.
§
readonly elements: HTMLFormControlsCollection
[src]Retrieves a collection, in source order, of all controls in a given form.
§Methods
§
addEventListener<K extends keyof HTMLElementEventMap>(
[src]type: K,
listener: (this: HTMLFormElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void§
addEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void§
checkValidity(): boolean
[src]Returns whether a form will validate when it is submitted, without having to submit it.
§
removeEventListener<K extends keyof HTMLElementEventMap>(
[src]type: K,
listener: (this: HTMLFormElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void§
removeEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void§
requestSubmit(submitter?: HTMLElement | null): void
[src]