Skip to content
Related Articles

Related Articles

Improve Article
jQuery | :submit Selector
  • Last Updated : 22 Feb, 2019

The :submit Selector is an inbuilt selector which is used to select the submit button and input element having submitted type field. If the type of button is undefined, most of the standard browsers use it as type=”submit”.

Syntax:

$(":submit")

Example:




<!DOCTYPE html>
<html>
  
<head>
    <script src=
  </script>
    <script>
        $(document).ready(function() {
            
          $(":submit").css("background-color", 
                           "coral");
        });
    </script>
</head>
  
<body>
    <center>
        <h1 style="color:green;">GeeksForGees</h1>
        <h2>jQuery :submit Selector</h2>
  
        <form action="#">
            Name:
            <input type="text" name="user">
            <br> Password:
            <input type="password" name="password">
            <br>
            <br>
            <input type="reset" value="Reset">
            <input type="submit" value="Submit">
            <br>
        </form>
  </center>
  
</body>
  
</html>

Output:

Supported Browsers: The browser supported by jQuery :submit Selector are listed below:

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



My Personal Notes arrow_drop_up
Recommended Articles
Page :