datalist
elementoption
elements.interface HTMLDataListElement : HTMLElement { readonly attribute HTMLCollection options; };
The datalist
element represents a set of
option
elements that represent predefined
options for other controls. The contents of the element represents
fallback content for legacy user agents, intermixed with
option
elements that represent the
predefined options. In the rendering, the datalist
element represents
nothing .
The datalist
element is hooked up to an
input
element using the list
attribute on the input
element.
Each option
element that is a descendant of
the datalist
element, that is not disabled, and whose value
is a string that isn't the empty string, represents a suggestion.
Each suggestion has a value
and a label.
options
Returns an HTMLCollection
of the options
elements of the table.