title: How to get value of checkbox in table?
body: <p>How  can I get value of checkbox in table? I want use it for in this case in order get parameter. Now, please see html table: </p>
  
  <pre><code>&lt;table id="div_func" class="table table-bordered" style="width: 100%"&gt;
                                          &lt;thead&gt;
                                              &lt;tr&gt;
                                                  &lt;th&gt;
                                                      &lt;input type="checkbox" id="chk_all" /&gt;&lt;/th&gt;
                                                  &lt;th&gt;Name&lt;/th&gt;
                                              &lt;/tr&gt;
                                          &lt;/thead&gt;
                                          &lt;tbody&gt;
          &lt;tr&gt;
          &lt;td&gt; &lt;input type="checkbox" class="checkbox1" id="chk" name="check[]" value="D01" /&gt;&lt;/td&gt;
          &lt;td&gt;Banana &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
          &lt;td&gt; &lt;input type="checkbox" class="checkbox1" id="chk" name="check[]" value="D02" /&gt;&lt;/td&gt;
          &lt;td&gt;Orange &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
          &lt;td&gt; &lt;input type="checkbox" class="checkbox1" id="chk" name="check[]" value="D03" /&gt;&lt;/td&gt;
          &lt;td&gt;Apple &lt;/td&gt;
          &lt;/tr&gt;
                  &lt;/tbody&gt;
                                      &lt;/table&gt;
  </code></pre>
  
  <p>And this is my script , I use for get value in checkbox , then put parameter </p>
  
  <pre><code>function add_funcgroup() {
              var func_group = [];
              var chk_allow = "";
              var table = document.getElementById("div_func");
              for (var i = 0; i &lt; table.rows.length; i++) {
                  if ($('#chk')[i].is(':checked')) {
                      chk_allow = "True";
                  }
                  else {
                      chk_allow = "False";
                  }
                  var group_func = {
                      GROUP_MOD_ID: id_temp,
                      FUNCTION_MOD_ID: $('#chk')[i].val(),
                      ALLOW: chk_allow
                  };
                  func_group[i] = group_func;
              }
  
              var func_group_temp = {
                  FUNC_MOD: func_group
              };
  
              var DTO = {
                  'func_group_temp': func_group_temp
              };
              $.ajax(
              {
  </code></pre>
  
  <p>And it's not working.</p>