HTML | DOM Input Search pattern Property Last Updated : 25 Aug, 2022 Comments Improve Suggest changes Like Article Like Report 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 returns the Input search pattern property.searchObject.patternIt is used to set Input search pattern property.searchObject.pattern = regexp Property Values: It contains single value regexp which is used to specify the regular expression that a search field value is checked against. Return Value: It returns a string value which represents the regular expression that a search field value is checked against. Example: This example illustrates the use of Input search pattern property. HTML <!DOCTYPE html> <html> <head> <title> Input Search pattern Property </title> <style> h1 { color: green; } h2 { font-family: Impact; } body { text-align: center; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h2> Input Search pattern Property </h2> <form id="myGeeks"> <input type="Search" id="test" placeholder="Type to search.." pattern="[A-Za-z]{3}"> </form> <br> <br> <button ondblclick="Access()"> click here </button> <p id="check" style="font-size:24px; color:green;"> </p> <script> function Access() { // Return Input search pattern property var s = document.getElementById( "test").pattern; document.getElementById( "check").innerHTML = s; } </script> </body> </html> Output: Before Clicking On Button: After Clicking On Button: Supported Browsers: The browser supported by DOM input search pattern Property are listed below: Google Chrome 5+Edge 12+Firefox 4+Opera 10.6+Safari 5+ Comment More infoAdvertise with us Next Article HTML | DOM Input Search pattern Property M manaschhabra2 Follow Improve Article Tags : Misc Web Technologies HTML HTML-DOM Practice Tags : Misc Similar Reads 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 URL pattern Property The DOM Input URL pattern Property in HTML DOM is used to set or return the pattern attribute of a URL 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 returns the 2 min read HTML | DOM Input Text pattern Property The Input Text pattern Property in HTML DOM is used to set or return the pattern attribute of an text 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 returns the 2 min read HTML | DOM Input Search placeholder Property The DOM Input Search placeholder Property in HTML DOM is used to set or return the value of the placeholder attribute of a search field. The placeholder attribute specifies the short hint that describes the expected value of an input field. The short hint is displayed in the field before the user en 2 min read HTML DOM Input Search list Property 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 t 1 min read Like