reset selector in jQuery with example

reset selector returns all input elements with type reset.

Example :

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

Demo :

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


Post a Comment