title: Delete checkbox containing row in form of html
body: <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>&lt;script&gt;
  function delBoxes(){
      var boxes = document.getElementsByClassName('chk');
      var texts = document.getElementsByClassName('txt');
      for(var i = 0; i&lt;boxes.length; i++){
          box = boxes[i];
          txt = texts[i];
          if(box.checked){
              box.parentNode.removeChild(box);
              txt.parentNode.removeChild(txt);
          }
      }
  }
  &lt;/script&gt;</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;  
  
  &lt;body&gt;
  &lt;form action="" method="post"&gt;
  &lt;table border="1" id="table"&gt;  
     &lt;tr&gt;  &lt;td colspan="2"&gt;Select Technolgy:&lt;/td&gt;   &lt;/tr&gt;  
     &lt;tr&gt;  &lt;td&gt;c&lt;/td&gt;  
        &lt;td&gt;&lt;input type="checkbox" name="techno[]" value="c" class='chk'&gt;&lt;/td&gt;  
     &lt;/tr&gt;  
     &lt;tr&gt;  &lt;td&gt;hadoop&lt;/td&gt;  
        &lt;td&gt;&lt;input type="checkbox" name="techno[]" value="hadoop" class = 'chk'&gt;&lt;/td&gt;  
     &lt;/tr&gt;  
     &lt;tr&gt;   &lt;td&gt;core java&lt;/td&gt;  
        &lt;td&gt;&lt;input type="checkbox" name="techno[]" value="Core JAVA"  class='chk'&gt;&lt;/td&gt;  
     &lt;/tr&gt;  
  
  &lt;input type="button" value="Click" id="btntest" /&gt;
  &lt;input type="checkbox" class = 'chk' /&gt; and
  &lt;input type="text" class = 'txt' /&gt;
  &lt;input type="button" value="Delete checked boxes" onclick = "delBoxes();" /&gt;
  &lt;/form&gt;
  
  
  &lt;/body&gt;  
  &lt;/html&gt; </code></pre>
  </div>
  </div>
  </p>
  
  <p>Using this code, I candelete the checked checkbox. But how can I remove the checked checkbox containing row of table in the form?</p>
  
  <p>I've read through <a href="https://stackoverflow.com/questions/19650108/how-to-delete-a-check-box-using-javascript">this question</a>, but it didn't help me.</p>