HTML DOM Datalist Object
Datalist object
The Datalist object is new in HTML5.
The Datalist object represents an HTML element.
Accessing the Datalist Object
You can use the getElementById() function to access an element.
var x = document.getElementById("myDatalist");
Try it
Creating the Datalist Object
You can use the document.createElement() method to create an element.
var x = document.createElement("DATALIST");
Try it
Datalist Object Collections
| Union | Description |
|---|---|
| options | Returns a collection of all the options in the datalist. |
Standard properties and events
The Datalist object also supports standard property and Events.
Related pages
HTML Tutorial: HTML Forms
HTML Reference Manual: HTML