submit selector in jQuery with example

Submit selector returns all input elements with type submit.

Example :

    <title>submit Selector</title>
    <script type="text/javascript" src=""> </script>
    <script type="text/javascript">
    $(":submit").text("Hello World");
    <button type="submit" id="submitButton">Submit</button>
    <button type="button" id="myButton">Click Me</button>
    <button type="button" onclick="location.reload()">Reset</button>

Demo :

In the above example, we have used submit selector. Submit selector return all input elements with type submit. In the above example the submit selector selects the submit button and changes its text on button click.


Post a Comment