radio selector in jQuery with example

Radio selector returns all input elements with type radio.

Example :

    <title>radio Selector</title>
    <script type="text/javascript" src=""> </script>
    <script type="text/javascript">
    Male<input type="radio" name="Gender" id="male">
    Female<input type="radio" name="Gender" id="female">
    <button id="myButton">Click Me</button>
    <button onclick="location.reload()">Reset</button>

Demo :

In the above example, we have used radio selector. Radio selector return all input elements with type radio. In the above example the radio selector selects the first radio button.


Post a Comment