enabled selector in jQuery wih example

enabled selector returns all enabled input elements on the page.

Example :

    <title>enabled 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="locatio.reload()">Reset</button>

Demo :

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


Post a Comment