input selector in jQuery with example

Input selector returns all input elements.

Example :

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

Demo :

In the above example, we have used input selector. Input selector return all input elements. In the above example the input selector selects the button element and changes text of the button.


Post a Comment