<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>删除checkbox</title>
</head>
<body>
<div class="box">
<label><input type="checkbox" value="苹果" />苹果</label>
<label><input type="checkbox" value="梨"/>梨</label>
<label><input type="checkbox" value="香蕉" />香蕉</label>
<label><input type="checkbox" value="橘子" />桔子</label>
</div>
<span class="delete">-删除</span>
<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script>
<script>
$(".delete").click(function(){
var s=$(".box input:checked");
console.log(s);
if(s.length>0){
for(var i=0;i<s.length;i++){
alert($(s[i]).val());
$(s[i]).parent("label").remove();
}
}
})
</script>
</body>
</html>