<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script src="./jquery-1.7.2.min.js"></script>
</head>
<body>
<p><input id="test" type="checkbox"/>1</p>
<p><input type="checkbox"/>2</p>
<p><input type="checkbox"/>3</p>
<p><input type="checkbox"/>4</p>
<p><input type="checkbox"/>5</p>
<button>全选</button>
<button>反选</button>
<button>删除</button>
</body>
<script>
$('button:first').click(function (){

$(':checkbox').attr('checked',true);

}).next().click(function (){

$(":checkbox").map(function(){
$(this).attr('checked',!$(this).attr('checked'));
});

}).next().click(function (){

$(':checked').parent().remove();

});
</script>
</html>