Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2019.
The list read-only property of the HTMLInputElement interface returns the HTMLDataListElement pointed to by the list attribute of the element, or null if the list attribute is not defined or the list attribute's value is not associated with any <datalist> in the same tree.
Note: This is a read-only property. To associate a <datalist> with an element, set the value of the list attribute with setAttribute().
An HTMLDataListElement or null.
Given the following HTML:
You can retrieve the <datalist> element associated with the <input>:
| HTML # dom-input-list-dev |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Apr 14, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.