title: Storing values of second <td>'s as comma separated just before deletion
body: <p>I have a table having 2 <code>&lt;td&gt;</code>'s one is having a checkbox and other having a value:</p>
  
  <p>My table as follows:</p>
  
  <pre><code>&lt;table border="1" id="table_sundry"&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;input type="checkbox" id="chk_1"&gt;&lt;/td&gt;
               &lt;td id="val1"&gt;a&lt;/td&gt;
      &lt;/tr&gt;
          &lt;tr&gt;
          &lt;td&gt;&lt;input type="checkbox" id="chk_2"&gt;&lt;/td&gt;
               &lt;td id="val2"&gt;b&lt;/td&gt;
      &lt;/tr&gt;
              &lt;tr&gt;
          &lt;td&gt;&lt;input type="checkbox" id="chk_3"&gt;&lt;/td&gt;
               &lt;td id="val3"&gt;c&lt;/td&gt;
      &lt;/tr&gt;
                    &lt;tr&gt;
          &lt;td&gt;&lt;input type="checkbox" id="chk_4"&gt;&lt;/td&gt;
               &lt;td id="val4"&gt;d&lt;/td&gt;
      &lt;/tr&gt;
                          &lt;tr&gt;
          &lt;td&gt;&lt;input type="checkbox" id="chk_5"&gt;&lt;/td&gt;
               &lt;td id="val3"&gt;e&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
                        &lt;input type="button" id="btn_del" value="deleterow"&gt;
  </code></pre>
  
  <p>I have a button to delete the rows after checking that particular row.</p>
  
  <p>In delete What I doing is as follows:</p>
  
  <pre><code>$("#btn_del").click(function(){ 
     var checked = $("#table_sundry tr input:checked").size();
      var total = $("#table_sundry tr").size()-1; 
      var rowcnt =  document.getElementById("table_sundry").rows.length-1;  
  
      var flag = 0;
      if($("#chk_"+rowcnt).prop('checked') == true){ //if delete contains last row
          $("#table_sundry tr input:checked").parents('tr').remove();
  
           flag =1;
          //updateRowCount(flag);
      }
      else{ 
              $("#table_sundry tr input:checked").parents('tr').remove();
              //updateRowCount(flag);
          }
  });
  </code></pre>
  
  <p><strong>I need to store the values of second column as comma separated. 
  Suppose if I delete first and last column I should get <code>a,e</code> in the variable.</strong></p>
  
  <p>Refer fiddle : <a href="https://jsfiddle.net/u8p5eovb/3/" rel="nofollow">FIDDLE</a></p>