<! DOCTYPE html>"http://www.w3.org/1999/xhtml">"Content-type"Content="text/html; Charset=utf-8"/> <title>selectAll</title> <style type="Text/css">Table {border:1px solid red; Border-Collapse:collapse; width:300px; Margin:auto; Text-Align:center; } </style> <script src="Js/jquery-1.7.1.js"></script> <script type="Text/javascript">$ (function () {$ (". All"). Click (function () {if($(". All"). attr ("checked")) {//Select All $(". CC"). attr ("checked",true); } Else{//Cancel Select all$(". CC"). Removeattr ("checked"); } }) $(". CC"). Click (function () {SelectAll (); })}) function SelectAll () {if(!$(". CC"). attr ("checked")) {//not selected$(". All"). attr ("checked",false) } Else{//Select All$(". All"). attr ("checked",true) } } </script>"TB"Border="1"> <tr> <td> sequences </td> </tr> <tr> <td> <input type="checkbox" class="cc"/></td> </tr> <tr> <td><input type="checkbox" class="cc"/></td> </tr> <tr> <td><input type="checkbox" class="cc"/></td> </tr> <tr> <td><input type="checkbox" class="cc"/></td> </tr> <tr> <td><input type="checkbox" class=" All"/>all</td> </tr> </table></body>CheckBox Select All jquery