HTML DOM Datalist Object


Datalist Object

The Datalist object is newly added in HTML5.

The Datalist object represents the HTML <datalist> element.

Access the Datalist Object

You can use the getElementById() function to access the <datalist> element:

var x = document.getElementById("myDatalist"); Try it Yourself

Create a Datalist Object

You can use the document.createElement() method to create a <datalist> element:

var x = document.createElement("DATALIST"); Try it Yourself

Datalist Object Collections

Collection Description
options Returns a collection of all options in the datalist

Standard Properties and Events

The Datalist object also supports standardpropertiesandevents。


Related Pages

HTML Tutorial:HTML Forms

HTML Reference Manual:HTML <datalist> Tag

Other Extensions