datalist object
Represents a set of option elements to provide a pre-defined set of choices.
![]() ![]() |
Syntax
var datalist = input.list;
DOM Information
Inheritance Hierarchy
Node
Element
HTMLElement
datalist
Members
The datalist object has these types of members:
Properties
The datalist object has these properties.
| Property | Access type | Description |
|---|---|---|
|
Read-only |
A collection of option objects that represent possible selections for a datalist element. | |
|
Determines whether data formats within content are automatically detected and (if found) converted to clickable links. |
Standards information
- HTML5 A vocabulary and associated APIs for HTML and XHTML, Section 4.10.10
Remarks
The following example uses a datalist object and options to display a list of files from a files dialog.
Examples
<form > Choose quantity : <input type="number" list="quantity" /> <datalist id="quantity"> <option label="A dozen" value="12" /> <option label="A gross" value="144" /> <option label="A thousand" value="1000" /> </datalist> <input type="submit" /> </form>
See also
Show:

