Mega Code Archive

 
Categories / JavaScript Tutorial / JQuery
 

Checked() matches all elements that are checked

< html>   <head>     <script type="text/javascript" src="js/jquery-1.3.2.js"></script>     <script type="text/javascript">         $(document).ready(function(){             alert($("input:checked").length);                });     </script>   </head>   <body>     <body>     <form>         <input type="button" value="Input Button"/>              <input type="checkbox">asdf</input>         <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>