<input type="checkbox" name="indexed" id="all" /> <br>
<input type="checkbox" name="indexed" id="all1" /> <br>
<input type="checkbox" name="indexed" id="all2" /> <br>
<input type="checkbox" name="indexed" id="all3" /> <br>
<input type="checkbox" id="checkAll"><label for="checkAll">全选</label>
$(document).ready( function() {
$("#checkAll").bind("change",function(){
var checked=$(this).attr("checked");
$(":checkbox[name='indexed']").attr("checked",checked);
});
});