<script src="http://www.aspbc.com/js/jquery.js"></script>
<script>
$(function(){
$("#b1").click(function(){
result = new Array();
$("[name=a1]:checked").each(function(){
result.push($(this).val());
});
str = result.join(",");
alert(str);
});
});
</script>
<input type="checkbox" name="a1" id="a1" value="1">1<input type="checkbox" name="a1" id="a2" value="2">2<input type="checkbox" name="a1" id="a3" value="3">3<input type="checkbox" name="a4" id="a4" value="4">4<br />
<input type="button" value="点击" id="b1" >