title: how can i find the specfic class from the given form element by selecting the form
body: <p>I developing a quiz app and I want to select a specific class from the given below in the javascript file</p>
  <pre><code> &lt;!DOCTYPE html&gt;
  &lt;html lang=&quot;en&quot;&gt;
  
  &lt;head&gt;
      &lt;meta charset=&quot;UTF-8&quot;&gt;
      &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
      &lt;title&gt;Quiz App&lt;/title&gt;
      &lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot;&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
      &lt;h2&gt; Css stand For&lt;/h2&gt;
      &lt;div class=&quot;container&quot;&gt;
          &lt;input type=&quot;checkbox&quot; class=&quot;answer&quot; value=&quot;Cascading stylesheet&quot; id=&quot;check1&quot;&gt;
          &lt;label for=&quot;check1&quot;&gt;Cascading stylesheet&lt;/label&gt;&lt;br&gt;
  
          &lt;input type=&quot;checkbox&quot; class=&quot;error&quot; value=&quot;Cascading stylesheet&quot; id=&quot;check2&quot;&gt;
          &lt;label for=&quot; check2&quot;&gt;Cascading stylesheet&lt;/label&gt;&lt;br&gt;
  
          &lt;input type=&quot;checkbox&quot; class=&quot;error&quot; value=&quot;Cascading stylesheet&quot; id=&quot;check3&quot;&gt;
          &lt;label for=&quot; check3&quot;&gt;Cascading
              stylesheet&lt;/label&gt;&lt;br&gt;
  
          &lt;input type=&quot;checkbox&quot; class=&quot;error&quot; value=&quot;Cascading stylesheet&quot; id=&quot;check4&quot;&gt;
          &lt;label for=&quot; check4&quot;&gt;Cascading
              stylesheet&lt;label&gt;
      &lt;/div&gt;
      &lt;button id=&quot;send&quot;&gt;Send&lt;/button&gt;
      &lt;script src=&quot;script.js&quot;&gt;&lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  <p>Here is the javascript function to select the given input check box but I can't get the property to select the specific class</p>
  <pre><code>let btn = document.getElementById('send');
  btn.addEventListener('click', () =&gt; {
      let check = document.querySelectorAll('checkbox');
      // console.log(check);
      check.forEach(addEventListener('change', getItem));
      function getItem() {
          console.log(2);
      }
  
      
  });
  </code></pre>