HTML DOM Input Text select() Method Last Updated : 20 Jun, 2023 Comments Improve Suggest changes Like Article Like Report The DOM Input select() method selects all the text content of a textarea or an input element that contains the text field. Syntax: element.select(); Parameters: This method does not accept any parameters. Example: This example selects the content of the input text field. HTML <!DOCTYPE html> <html> <head> <title> HTML DOM Input Text select() Method </title> </head> <body> <h1 style="color:green;"> GeeksForGeeks </h1> <h2> DOM select() Method </h2> <input type="text" id="text-box" size="20" value="A computer science portal"> <button onclick="selectText()"> Select text </button> <script> function selectText() { const content = document.getElementById('text-box'); content.select(); } </script> </body> </html> Output: Supported Browsers: The browsers supported by HTML DOM Input Text select() Method are listed below: Google Chrome 1Edge 12Firefox 1Apple Safari 1Opera Comment More infoAdvertise with us Next Article HTML DOM Input Text select() Method D DeepakDev Follow Improve Article Tags : Web Technologies HTML Web technologies HTML-DOM Similar Reads HTML DOM Input Tel select() Method The input tel select() method in HTML DOM is used to select the contents of the input tel field. It is an in-built method of the input tel object. Syntax: telObject.select() Parameters: This method does not accept any parameters. Return Value: This method does not return any value. Example: Below HT 1 min read HTML DOM Input Time select() Method The input Time select() method in HTML DOM is used in selecting the content of the time text field. Syntax: timeObject.select() Parameters: It does not accept any parameter. Return Value: It does not return any value. Example: This example uses the input Time select() method to select the content i 1 min read HTML DOM Input Week select() Method The input week select() method in HTML DOM is used in selecting the content of the week field. Syntax: weekbject.select() Parameters: It does not accept any parameter. Example: This example uses the input week select() method to select the week field. HTML <!DOCTYPE html> <html> <head 1 min read HTML DOM Input URL select() Method The HTML <input type=âurlâ> is used to define a field that entered a URL. This input value is automatically validated before submitting the form. The input URL select() method in HTML DOM is used to select the content of a URL text field. It is an in-built method of input URL Object. Refer to 1 min read HTML DOM Input Date select() Method The Input Date select() Method in HTML DOM is used to select the contents of the Date text field. It is the predefined method of the Input date object. Syntax: dateObject.select() Parameter: This method does not contain any parameters. Return Values: It does not return any value. Example: Below exam 1 min read Like