HTML DOM Input Text list Property Last Updated : 26 Aug, 2022 Comments Improve Suggest changes Like Article Like Report The input Text list property in HTML DOM is used to return a reference to the datalist element that contains an input text field. Syntax: textObject.list.id Return Value: It returns a string value that represents the value of the id attribute of the datalist element. Example: Below HTML code used to return the input text list property. HTML <!DOCTYPE html> <html> <head> <title> HTML DOM Input Text list Property</title> </head> <body style="text-align:center"> <h1 style="color:green"> GeeksforGeeks </h1> <h2>DOM Input Text list property</h2> <label><b>Your Cars Name:</b> </label> <input type="text" list="cars" id="text_id" value=""> <datalist id="cars"> <option value="BMW" /> <option value="Bentley" /> <option value="Mercedes" /> <option value="Audi" /> <option value="Volkswagen" /> </datalist><br><br> <button onclick="btnclick()">Click Here!</button> <p id="paraID" style="font-size:20px"></p> <!-- script to access text field --> <script> function btnclick() { var txt = document.getElementById("text_id").list.id; document.getElementById("paraID").innerHTML = txt; } </script> </body> </html> Output: Supported Browsers: Google Chrome 1Edge 12Mozilla Firefox 1OperaSafari 1 Comment More infoAdvertise with us Next Article HTML DOM Input Text list Property M manaschhabra2 Follow Improve Article Tags : HTML HTML-DOM HTML-Property Similar Reads HTML DOM Input Tel list Property The input Tel list property in HTML DOM is used to return a reference to the list element that contains an input tel field.Syntax:telObject.list.idReturn value: It returns a string value that represents the value of the id attribute of the datalist element.Example: Â Below HTML code used to return th 1 min read HTML DOM Input Time list Property The input Time list property in HTML DOM is used to return a reference to the list element that contains an input Time field. Syntax: timeObject.list.idReturn value: It returns a string value that represents the value of the id attribute of the datalist element. Example: Below HTML code is used to r 1 min read HTML DOM Input week list Property The input week list property in HTML DOM is used to return the reference to the list element that contains an input week field. Syntax: weekObject.list.id Return value: It returns a string value that represents the value of the id attribute of the datalist element. Example: Below HTML code is used t 1 min read HTML DOM Input Range list Property The input Range list property in HTML DOM is used to return a reference to the datalist element that contains an input range field. Syntax: rangeObject.list.id Return Value: It returns a string value that represents the value of the id attribute of the datalist element. Example: Below HTML code is u 1 min read HTML DOM Input URL list Property The input URL list property in HTML DOM is used to return a reference to the datalist element that contains an input URL field. Syntax: urlObject.list.id Return Value: It returns a string value that represents the value of the id attribute of the datalist element. Example: Below HTML code is used to 1 min read Like