Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

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,
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,
options?: boolean | EventListenerOptions,
): void;
reportValidity(): boolean;
requestSubmit(submitter?: HTMLElement | null): void;
reset(): void;
submit(): void;
}
var HTMLFormElement: {
prototype: HTMLFormElement;
new (): HTMLFormElement;
}
;

§Extends

§Index Signatures

§
[index: number]: Element
§
[name: string]: any

§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.

§
action: string
[src]

Sets or retrieves the URL to which the form content is sent for processing.

§
autocomplete: string
[src]

Specifies whether autocomplete is applied to an editable text field.

§

Retrieves a collection, in source order, of all controls in a given form.

§
encoding: string
[src]

Sets or retrieves the MIME encoding for the form.

§
enctype: string
[src]

Sets or retrieves the encoding type for the form.

§
readonly length: number
[src]

Sets or retrieves the number of objects in a collection.

§
method: string
[src]

Sets or retrieves how to send the form data to the server.

§
name: string
[src]

Sets or retrieves the name of the object.

§
noValidate: boolean
[src]

Designates a form that is not validated when submitted.

§
target: string
[src]

Sets or retrieves the window or frame at which to target content.

§Methods

§
[[Symbol.iterator]](): IterableIterator<Element>
[src]
§
addEventListener<K extends keyof HTMLElementEventMap>(
type: K,
listener: (this: HTMLFormElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
[src]
§
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
[src]
§
checkValidity(): boolean
[src]

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

§
removeEventListener<K extends keyof HTMLElementEventMap>(
type: K,
listener: (this: HTMLFormElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
[src]
§
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void
[src]
§
reportValidity(): boolean
[src]
§
requestSubmit(submitter?: HTMLElement | null): void
[src]
§
reset(): void
[src]

Fires when the user resets a form.

§
submit(): void
[src]

Fires when a FORM is about to be submitted.