1<! DOCTYPE HTML Public"-//W3C//DTD XHTML 1.0 transitional//en" "HTTP://WWW.W3.ORG/TR/XHTML1/DTD/XHTML1-TRANSITIONAL.DTD">2"http://www.w3.org/1999/xhtml">3"Server">4<title>jquery implement checkbox Select All, select All </title>5<script src="Http://code.jquery.com/jquery-1.4.4.min.js"Type="Text/javascript"></script> <script type="Text/javascript">6 $ (function () {7$("#checkAll"). Click (function () {8$('input[name= "Subbox"]'). attr ("checked", This.checked); 9 });Ten var$subBox = $ ("input[name= ' Subbox ']"); One $subBox. Click (function () { A$("#checkAll"). attr ("checked", $subBox. Length = = $ ("input[name= ' Subbox ']:checked"). length?true:false); - }); - }); the</script> - - -<body> +<div> -<input id="Checkall"Type="checkbox"/>Select All +<input name="Subbox"Type="checkbox"/>Item 1 A<input name="Subbox"Type="checkbox"/>Item 2 at<input name="Subbox"Type="checkbox"/>Item 3 -<input name="Subbox"Type="checkbox"/>Item 4 -</div> -</body> -jquery Implementation checkbox Select All, select All