<html>
<script type="text/javascript" src="jquery-1.3.2.js"></script>
<body>
<script>
$(function(){
$("input[type=checkbox]").click(
function(e){
alert($(e.target).val()); // e.target 捕捉到触发的目标元素
}
);
});
</script>
<input type="checkbox" value="1"/>a<br />
<input type="checkbox" value="2" />b<br />
<input type="checkbox" value="3"/>c<br />
<input type="checkbox" value="4"/>d<br />
<input type="checkbox" value="5"/>e<br />
<input type="checkbox" value="6"/>f<br />
<input type="checkbox" value="all" id="checkAll" />全选<br />
</body>
</html>