← 返回首页
HTMLDataListElement: options property - Web APIs | MDN

HTMLDataListElement: options property

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2019.

The options read-only property of the HTMLDataListElement interface returns an HTMLCollection of HTMLOptionElement elements contained in a <datalist>. The descendant <option> elements provide predefined options for the <input> control associated with the <datalist>.

In this article

Value

An HTMLCollection of HTMLOptionElement elements.

Specifications

Specification
HTML
# dom-datalist-options-dev

Browser compatibility

Enable JavaScript to view this browser compatibility table.

See also