获取 checkbox 所有选中状态的值
html代码
<input type="checkbox" obj_id="1" class="c-box">
<input type="checkbox" obj_id="2" class="c-box">
<input type="checkbox" obj_id="3" class="c-box">
<input type="checkbox" obj_id="4" class="c-box">
js代码
$(".c-box:checked").each(function(){
alert($(this).attr("obj_id"));//遍历选中项的值
});
亲自测试, 有效!