disabled selector in jQuery with example

disabled selector returns all disabled input elements.

Example :

    <title>disabled Selector</title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"> </script>
    <script type="text/javascript">
    <button type="button"  disabled="disabled">disabled</button>
    <input type="textbox" disabled="disabled"><br>
    <button type="button">enabled</button>
    <input type="textbox">
    <button id="myButton">Click</button>
    <button onclick="location.reload()">Reset</button>

Demo :

In the above example, we have used disabled selector. Disabled selector returns all disabled input elements. In above example, it selects the disabled button and textbox and applies CSS to it.


Post a Comment