HTML DOM Input Text type Property Last Updated : 02 Jan, 2024 Comments Improve Suggest changes Like Article Like Report The Input Text type Property in HTML DOM is used to return the type of form element of the text field. It always returns the text for an Input text field. Syntax: textObject.typeReturn Value: It returns a string value that represents the type of form element the input text field is. Below program illustrates the text type property in HTML DOM: Example: This example returns the type of form element of the text field. HTML <!DOCTYPE html> <html> <head> <title> HTML DOM Input Text type Property </title> </head> <body style="text-align:center;"> <h1>GeeksforGeeks</h1> <h2>HTML DOM Input Text type Property</h2> <input type="text" id="text_id" value="Hello Geeks!"> <br><br> <button onclick="myGeeks()"> Click Here! </button> <p id="GFG"></p> <!-- script to return the type Property--> <script> function myGeeks() { let txt = document.getElementById("text_id").type; document.getElementById("GFG").innerHTML = txt; } </script> </body> </html> Output: Supported Browsers: Google Chrome 1Edge 12Firefox 1OperaSafari 1 Comment More infoAdvertise with us Next Article HTML DOM Input Text type Property M manaschhabra2 Follow Improve Article Tags : Misc Web Technologies HTML HTML-DOM Practice Tags : Misc Similar Reads HTML DOM Input Tel type Property The DOM Input tel type property in HTML DOM is used to return the type of form element of the input tel field. It always returns the "tel" for an Input tel field. Syntax: telObject.typeReturn Values: It returns a string value that represents the type of form element of the tel field. The below progr 1 min read HTML | DOM Input Range type Property The DOM Input Range type Property in HTML DOM is used for returning the which type of form element the slider control is. All the Browser should return "range". whereas the Internet Explorer always returns the "text" instead of "range". Syntax: rangeObject.type Return Value: It returns a string valu 1 min read HTML DOM Input Submit type Property The Input Submit type Property in HTML DOM returns the type of form element of the submit field. It always returns the submit for an Input submit field. Syntax: submitObject.typeReturn Values: It returns a string that represents the type of form element an input submit field is. Example: This examp 1 min read HTML | DOM Input URL type Property The DOM Input URL type Property in HTML DOM is used for returning the Which type of form element the URL field is. This Property will always return "URL".Syntax: urlObject.type Return Value: It returns a string value which represent the type of form element the URL field is. Example: This Example il 1 min read HTML | DOM Input Text form Property The DOM Input Text form Property in HTML DOM is used to return the reference of form containing the input Text field. It is a read-only property that returns the form object on success. Syntax: textObject.form Return Values: It returns a string value which specify the reference of the form containin 1 min read Like