我想获取多个选中复选框的 id
HTML:
<input type="checkbox" class="a" id="1">1
<input type="checkbox" class="a" id="2">2
<input type="checkbox" class="a" id="3">3
<input type="checkbox" class="a" id="4">4
<input type="checkbox" class="a" id="5">5
<input type="button" value="Button" id="button">
JS:
$("#button").live('click',function(){
var a = document.getElementsByClassName("a");
alert(a);
alert(a.checked);
});