获取复选框选中或不在jQuery中的数组
这个问题在这里已经有了答案:
  输入的value属性返回值。  您应该使用checked复选框的返回状态。 
var is_checked = $("input[name='mark_box[]']").map(function(){
  return this.checked ? 1 : 0;
}).get(); 
var is_checked = $("input[name='mark_box[]']").map(function(){
  return this.checked ? 1 : 0;
}).get(); 
console.log(is_checked);<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="checkbox" checked id="mark_box0" name="mark_box[]">
<input type="checkbox" id="mark_box1" name="mark_box[]">
<input type="checkbox" id="mark_box2" name="mark_box[]">你使用的方式是正确的,但是你得到的价值在每个州都会保持不变。 你必须检查复选框是否被选中。 代码如下:
var is_checked = $("input[name='mark_box[]']").map(function(){
       return $(this).attr("checked");
}).get(); 
如果您有任何疑问,请告诉我。
你需要检查checked而不是value 
$(".button").click(function() {
  var checkedArray = $("input[name='mark_box[]']").map(function() {
    return this.checked;
  }).get();
  console.log(checkedArray);
});<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="checkbox" id="mark_box0" name="mark_box[]">
<input type="checkbox" id="mark_box1" name="mark_box[]">
<input type="checkbox" id="mark_box2" name="mark_box[]">
<button class='button'>Submit</button>