HTML | DOM Input Email Object Last Updated : 25 Aug, 2022 Comments Improve Suggest changes Like Article Like Report The Input Email Object in HTML DOM is used to represent the HTML input element with type="email" attribute. The input element with type="email" attribute can be accessed by using getElementById() method. Syntax: It is used to access input email object.document.getElementById("id");It is used to create input element.document.createElement("input"); Input Email Object Properties: PropertyDescriptiontypeThis property is used to return the type of form element to the email field.valueThis property is used to set or return the value of the value attribute of an email field.autocompleteThis property is used to set or return the value of the autocomplete attribute of an email field.autofocusThis property is used to set or return whether an email field should automatically get focus when the page loads.defaultValueThis property is used to set or return the default value of an email field.disabledThis property is used to set or return whether an email field is disabled or not.formThis property is used to return reference to the form that contains the email field.listThis property is used to return a reference to the datalist that contains the email field.maxLengthThis property is used to set or return the value of the maxlength attribute of an email field.multipleThis property is used to set or return whether a user is allowed to enter more than one email address in the email field.nameThis property is used to set or return the value of the name attribute of an email field.patternThis property is used to set or return the value of the pattern attribute of an email field.placeholderThis property is used to set or return the value of the placeholder attribute of an email field.readOnlyThis property is used to set or return whether the email field is read-only or not.requiredThis property is used to set or return whether the email field must be filled out before submitting a form.sizeThis property is used to set or return the value of the size attribute of the email field. Methods select () : It is used to select the content of a Input Email text field. Example 1: This example uses getElementById() method to access <input> element with type="email" attribute. html <!DOCTYPE html> <html> <head> <title> HTML DOM Input Email Object </title> </head> <body> <h1> GeeksforGeeks</h1> <h2>DOM Input Email Object</h2> E-mail: <input type="email" id="email" value="[email protected]"> <button onclick="myGeeks()"> Click Here! </button> <p id="GFG"></p> <!-- Script to access input element with type email attribute --> <script> function myGeeks() { var em = document.getElementById("email").value; document.getElementById("GFG").innerHTML = em; } </script> </body> </html> Output: Before click on the button: After click on the button: Example 2: This example uses document.createElement() method to create <input> element with type="email" attribute. html <!DOCTYPE html> <html> <head> <title> HTML DOM Input Email Object </title> </head> <body> <h1> GeeksforGeeks</h1> <h2>DOM Input Email Object</h2> <button onclick="myGeeks()"> Click Here! </button> <!-- script to create input element of type email attribute --> <script> function myGeeks() { /* Create an input element */ var x = document.createElement("INPUT"); /* Set the type attribute */ x.setAttribute("type", "email"); /* Set the value to type attribute */ x.setAttribute("value", " [email protected]"); /* Append the element to body tag */ document.body.appendChild(x); } </script> </body> </html> Output: Before click on the button: After click on the button: Supported Browsers: Google Chrome 5Edge 12FirefoxOpera 11Safari Comment More infoAdvertise with us D divyatagoel0709 Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML | DOM Window stop() Method The stop() method in DOM is used to stop the window from loading resources in the current browsing context, similar to the browser's stop button. Syntax: window.stop() Example: Stop window from loading. html <!DOCTYPE html> <html> <head> <title> HTML | DOM Window stop() Metho 1 min read HTML | DOM Ol reversed Property The DOM Ol reversed Property is used to set or return whether the list items are in Descending order(9, 8, 7, 6, ...) or in Ascending order(1, 2, 3, 4...). Syntax: It is used to return the reversed property.olObject.reversedIt is used to set the reversed property.olObject.reversed = true|false Prope 2 min read HTML | DOM Ol type Property The DOM Ol type Property is used to set or return the type attribute in an ordered list. This attribute defines which type(1, A, a, I and i) of order you want in your list numeric, alphabetic or roman numbers. Syntax: It is used to return the type property. olObject.type It is used to set the type p 2 min read HTML | DOM Form enctype Property The Form enctype property in HTML DOM is used to set or return the value of the enctype attribute in a form. This attribute specifies the data that will be present in the form should be encoded when submitting to the server. This type of attribute can be used only if method = "POST". Syntax: It is u 3 min read HTML DOM Form reset() Method The reset() method in the HTML DOM is used to reset a form fields to their default values. When a form is reset, all user input is cleared, and the fields revert to their initial states.SyntaxformObject.reset()Example: In this example, clicking the reset button clears the form inputs. html<!DOCTY 1 min read HTML | DOM Form submit() Method The form submit() Method in HTML DOM is used to send the form data to the web-server. It works as same as submit button. It does not contain any parameters. Syntax: formObject.submit()Example: index.html<!DOCTYPE html> <html> <head> <title> HTML DOM Form submit() Method </ 1 min read HTML | DOM Location Search Property The Location Search property in HTML DOM is used to set or return the query part of URL including question mark. The query part is the part of URL after the question mark. Syntax: It returns the location search property.location.searchIt is used to set the location search property.location.search = 1 min read HTML DOM Form action Property The HTML DOM Form action property allows accessing and modifying the action attribute of a form element through JavaScript. It determines the URL where form data is submitted when the form is submitted. Syntax: It is used to return the action property. formObject.actionIt is used to set the action p 3 min read HTML | DOM Form autocomplete Property The Form autocomplete property in HTML DOM is used to set or return of the autocomplete attribute. The autocomplete attribute is used to specify whether the autocomplete attribute has "on" or "off" value. When the autocomplete attribute is set to on so the browser will automatically complete the val 2 min read HTML | DOM Textarea rows Property The DOM Textarea rows Property is used to set or return the value of a rows attribute of a textarea field. The rows attribute specifies the number of visible text lines for the control i.e the number of rows to display. Syntax: It is used to Return the rows property:textareaObject.rowsIt is used to 2 min read Like