Skip to content
Related Articles

Related Articles

HTML DOM Input Email select() Method

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 07 Feb, 2022

The input email select() method in HTML DOM is used to select the content of the email text field. It is the in-built method of the input email object. 


Parameters: It does not accept any parameters.

Return Value: It does not return any value.

Example: This example uses the input email select() method to select the content inside the email Field.  


<!DOCTYPE html>
        HTML DOM Input Email select() Method
    <h1 style="color:green">GeeksforGeeks</h1>
    <h2>DOM Input Email select() method</h2>
     Enter E-mail Address: 
     <input type="email" id="email"
            value="" autofocus>
    <button onclick="mySelect()">
        Select Contents of Email Field!
    <!-- Script to select input element with
            type email attribute -->
        function mySelect() {
            var em = document.getElementById("email").select();


HTML DOM Input Email select() Method

HTML DOM Input Email select() Method

Supported Browsers:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Safari
  • Opera

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!