HTML DOM Input Search list Property Last Updated : 25 Aug, 2022 Comments Improve Suggest changes Like Article Like Report The input Search list property in HTML DOM is used to return a reference to the list element that contains an input search field. Syntax searchObject.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 search list property. HTML <!DOCTYPE html> <html> <head> <title> HTML DOM Input search list property </title> </head> <body style="text-align:center"> <h1 style="color:green"> GeeksforGeeks </h1> <h2>DOM Input search list property</h2> <label>Search anything: </label> <input type="search" list="Hello Geeks" id="search_id" value="GeeksforGeeks"> <datalist id="Hello Geeks"> <option value="Google" /> <option value="amazon" /> <option value="flipkart" /> <option value="Twitter" /> <option value="Facebook" /> </datalist><br><br> <button onclick="btnclick()">Click Here!</button> <p id="paraID" style="font-size:20px"></p> <!-- script to access search field --> <script> function btnclick() { var txt = document.getElementById("search_id").list.id; document.getElementById("paraID").innerHTML = txt; } </script> </body> </html> Output: Supported Browsers: Google Chrome 5 and aboveEdge 12 and aboveMozilla Firefox 4 and aboveOpera 10.6 and aboveSafari 5 and above Comment More infoAdvertise with us Next Article HTML DOM Input Search list Property M manaschhabra2 Follow Improve Article Tags : HTML HTML-DOM HTML-Property Similar Reads 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 HTML DOM Input Search name Property The Input Search name Property in HTML DOM is used to set or return the value of the name attribute of a search field. The name attribute is required for each input field. If the name attribute is not specified in an input field then the data of that field would not be sent at all. Syntax: It retu 2 min read HTML | DOM Input Search pattern Property The DOM Input Search pattern Property in HTML DOM is used to set or return the pattern attribute of a search field. It is used to specify the regular expression on which the input elements value is checked. Use the global title attribute to describe the pattern for helping the user. Syntax: It retur 2 min read HTML | DOM Input Search maxLength Property The DOM Input Search maxLength Property in HTML DOM is used to set or return the value of maxlength attribute of a search Input Field. It specifies the maximum number of characters that have been allowed in the search field. The default value of Input search maxLength property is 524288. Syntax: It 2 min read HTML DOM Input Text list Property 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 1 min read Like