HTML DOM Datalist Object


Datalist Object

The Datalist object represents an HTML <datalist> element.

Note: The <datalist> element is not supported in Internet Explorer 11 (and earlier versions).

Access a Datalist Object

You can access a <datalist> element by using getElementById():

Example

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

Create a Datalist Object

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

Example

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

Datalist Object Collections

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

Standard Properties and Events

The Datalist object also supports the standard properties and events.


Related Pages

HTML tutorial: HTML Forms

HTML reference: HTML <datalist> tag


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.