<input type="checkbox" id="allcheck"/>全选</br>
<input type="checkbox"/>苹果</br>
<input type="checkbox"/>西瓜</br>
<input type="checkbox"/>香蕉</br>
<input type="checkbox"/>橘子</br>
$(function(){
$('#allcheck').click(function(){
$('input[type=checkbox]').attr('checked',this.checked);
});
});