Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

HTML DOM Datalist object


May 06, 2021 JavaScript with HTML DOM Reference book


Table of contents


HTML DOM Datalist object


Datalist object

The Datalist object is new to HTML5.

The Datalist object stands for HTML and the datalist element.

Access the Datalist object

You can use the getElementById() function to access the elements of the .lt;datalist:

varx = document.getElementById("myDatalist"); try it

Create a Datalist object

You can use the document.createElement() method to create the element of the .lt;datalist:

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

Datalist object collection

gather describe
options Returns a collection of all options in DataList

Standard properties and events

The Datalist object also supports standard properties and events.


Related pages

HTML tutorial: HTML forms

HTML Reference Manual: HTML slt;datalist.gt; Tags