title: how to get multiple checkbox values from html form
body: <p>I understand that I can use jQuery (<a href="https://stackoverflow.com/questions/11945802/how-to-get-multiple-checkbox-value-using-jquery">how to get multiple checkbox value using jquery</a>)  to get checkbox values when there are multiple, but my checkbox inputs are inside an html form, so those jQuery solutions aren't working because none of them get the checkbox values from within a form. </p>
  
  <p>I try to extract the values from the form, but it just creates a weird radio nodelist that seems to count the number of times the name of the checkboxes appears in the doc rather than the values.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function validateForm() {
    var checks = document.forms["TestForm"]["ParticipantSelection[]"];
    alert(checks);
  
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"&gt;&lt;/script&gt;
  
  &lt;form name="TestForm" action="Video1.php" method="post" onsubmit="return validateForm()"&gt;
  
    &lt;table&gt;
  
      &lt;tr&gt;
        &lt;th&gt;&lt;img name="&lt;?php echo $valueindicator[0];?&gt;" src="&lt;?php echo $all_four_images[0];?&gt;" height="100"&gt;
        &lt;/th&gt;
  
        &lt;th&gt;&lt;img name="&lt;?php echo $valueindicator[1];?&gt;" src="&lt;?php echo $all_four_images[1];?&gt;" height="100"&gt;
        &lt;/th&gt;
        &lt;th&gt;&lt;img name="&lt;?php echo $valueindicator[2];?&gt;" src="&lt;?php echo $all_four_images[2];?&gt;" height="100"&gt;
        &lt;/th&gt;
      &lt;/tr&gt;
  
      &lt;tr&gt;
        &lt;th&gt; &lt;input type="checkbox" name="ParticipantSelection[]" value="image1"&gt;
        &lt;/th&gt;
  
        &lt;th&gt;&lt;input type="checkbox" name="ParticipantSelection[]" value="image2"&gt;
        &lt;/th&gt;
  
        &lt;th&gt;&lt;input type="checkbox" name="ParticipantSelection[]" value="image3"&gt;
        &lt;/th&gt;
      &lt;/tr&gt;
  
  
    &lt;/table&gt;
    &lt;input type="hidden" name="AnswerCondition" value="BrowserCheckAnswer"&gt;
  
  
    &lt;button type="submit"&gt;Continue&lt;/button&gt;
  
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>But I have no idea how to get the js to get the value of whats inside the form inputs instead of counting something else, and no idea how to access the values of the checked boxes</p>