disabled() matches all elements that are disabled. : Selector Form « jQuery « JavaScript Tutorial






<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
            alert($("input:disabled").length);
      

        });
    </script>
  </head>
  <body>
    <body>
    <form>
        <input type="button" value="Input Button" disabled="disabled"/>
    
        <input type="checkbox">asdf</input>
        <input type="checkbox" />
        <input type="checkbox" />
        <input type="file" />
        <input type="hidden" />
        <input type="image" />
        <input type="password" />
        <input type="radio" />
        <input type="reset" />
        <input type="submit" />
        <input type="text" />
    
        <select><option>Option<option/></select>
        <textarea></textarea>
        <button>Button</button>
    </form>    
    </body>
</html>








30.7.Selector Form
30.7.1.image() matches all input elements of type image.
30.7.2.input() matches all input, textarea, select and button elements.
30.7.3.Get all form children
30.7.4.password() matches all input elements of type password.
30.7.5.radio() matches all input elements of type radio.
30.7.6.reset() matches all input elements of type reset.
30.7.7.submit() matches all input elements of type submit.
30.7.8.text() matches all input elements of type text.
30.7.9.checked() matches all elements that are checked.
30.7.10.disabled() matches all elements that are disabled.
30.7.11.enabled() matches all elements that are enabled.
30.7.12.selected() matches all elements that are selected.
30.7.13.Finds all button inputs.
30.7.14.Finds all inputs that don't have the name 'n'
30.7.15.Finds all inputs that have an id attribute and whose name attribute ends with man and sets the value.
30.7.16.Finds all inputs with name 'ab'
30.7.17.Finds all inputs with an attribute name that ends with 'b'
30.7.18.Finds all inputs that with a name attribute that contains 'a'
30.7.19.Finds all inputs that are not checked and highlights the next sibling span.
30.7.20.checkbox() matches all input elements of type checkbox.
30.7.21.Shows all hidden divs and counts hidden inputs.
30.7.22.file() matches all input elements of type file.
30.7.23.Finds the button with no siblings in each matched div and modifies look.
30.7.24.Get disabled form fields
30.7.25.Get enabled form fields
30.7.26.Find the very next sibling of each disabled button and change its text "this button is disabled".
30.7.27.Finds all inputs of type radio within the first form in the document