interface dom.HTMLSelectElement
implements HTMLElement
import { type dom } from "https://deno.land/x/evt@v2.5.3/lib/index.ts";
const { HTMLSelectElement } = dom;
A HTML Element. These elements also share all of the properties and methods of other HTML elements via the HTMLElement interface.
Properties
readonly
form: HTMLFormElement | nullRetrieves a reference to the form that the object is embedded in.
readonly
labels: NodeListOf<HTMLLabelElement>readonly
options: HTMLOptionsCollectionreadonly
selectedOptions: HTMLCollectionOf<HTMLOptionElement>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.
Methods
add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number | null): void
Adds an element to the areas, controlRange, or options collection.
item(index: number): Element | null
Retrieves a select object or an object from an options collection.
namedItem(name: string): HTMLOptionElement | null
Retrieves a select object or an object from an options collection.
addEventListener<K extends keyof HTMLElementEventMap>(): void
type: K,
listener: (this: HTMLSelectElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
addEventListener(): void
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
removeEventListener<K extends keyof HTMLElementEventMap>(): void
type: K,
listener: (this: HTMLSelectElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | EventListenerOptions,