复选框
<label class="checkbox"><input type="checkbox" name="checkbox-1" checked=""><i></i>文字</label> <label class="checkbox"><input type="checkbox" name="checkbox-2"><i></i>文字</label>

禁用状态
<label class="checkbox"><input type="checkbox" name="checkbox-2" disabled=""><i></i>文字</label> <label class="checkbox"><input type="checkbox" name="checkbox-2" disabled="" checked=""><i></i>文字</label>

颜色
<label class="checkbox checkbox-red"><input type="checkbox" name="checkbox-2" checked=""><i></i>文字</label> <label class="checkbox checkbox-yellow"><input type="checkbox" name="checkbox-2" checked=""><i></i>文字</label> <label class="checkbox checkbox-blue"><input type="checkbox" name="checkbox-2" checked=""><i></i>文字</label> <label class="checkbox checkbox-green"><input type="checkbox" name="checkbox-2" checked=""><i></i>文字</label> <label class="checkbox checkbox-info"><input type="checkbox" name="checkbox-2" checked=""><i></i>文字</label>

全选/取消
ID First Last Handle
1 Mark Otto @mdo
2 Jacob Thornton @fat
3 Larry the Bird @twitter
4 Mark Otto @mdo
5 Jacob Thornton @fat
取值
<form class="form-test"> <table class="table table-border table-hover table-striped"> <thead class="thead-gray"> <tr> <th width="60" class="text-center"><label class="checkbox tips" data-align="right-top" data-title="全选/取消"><input type="checkbox" class="checkall" value=""><i></i></label></th> <th>ID</th> <th>First</th> <th>Last</th> <th>Handle</th> </tr> </thead> <tbody> <tr> <td class="text-center"><label class="checkbox"><input type="checkbox" name="id" value="1"><i></i></label></td> <td>1</td> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <td class="text-center"><label class="checkbox"><input type="checkbox" name="id" value="2"><i></i></label></td> <td>2</td> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <td class="text-center"><label class="checkbox"><input type="checkbox" name="id" value="3"><i></i></label></td> <td>3</td> <td>Larry</td> <td>the Bird</td> <td>@twitter</td> </tr> <tr> <td class="text-center"><label class="checkbox"><input type="checkbox" name="id" value="4"><i></i></label></td> <td>4</td> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <td class="text-center"><label class="checkbox"><input type="checkbox" name="id" value="5"><i></i></label></td> <td>5</td> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> </tbody> </table> </form> <div class="btn btn-blue mt" id="getVal">取值</div> <script> $(function() { //取值方法 $("#getVal").click(function() { var data=[]; $(".form-test").find("input[type=checkbox]:checked").each(function() { if($(this).attr("class")!='checkall') { data.push($(this).val()) } }) alert(data.join(",")); }) }) </script>