title: Passing a particular column value from one html table to another html table using jquery
body: <p>I'm looking to copy column values of one particular column to another  table column.</p>
  
  <p><strong>Scenario</strong>:</p>
  
  <p><strong>Table1</strong>: An html table with <em>n</em> columns and data from excel.</p>
  
  <p>I'm trying to achieve:</p>
  
  <p><strong>Table2</strong>: To pass particular column values from <strong>table1</strong> to a column of table2, in the same js file as Table1.</p>
  
  <p>Table1 -- Code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
      $(function () {
          $("#upload").bind("click", function () {
              var regex = /^([a-zA-Z0-9\s_\\.\-:])+(.csv|.txt|.xlsx|.xls)$/;
              if (regex.test($("#fileUpload").val().toLowerCase())) {
                  if (typeof (FileReader) != "undefined") {
                      var reader = new FileReader();
                      reader.onload = function (e) {
                          var table = $("&lt;table /&gt;");
                          var rows = e.target.result.split("\n");
                          for (var i = 0; i &lt; rows.length; i++) {
                              var row = $("&lt;tr /&gt;");
                              var cells = rows[i].split(",");
                              for (var j = 0; j &lt; cells.length; j++) {
                                  var cell = $("&lt;td /&gt;");
                                  cell.html(cells[j]);
                                  cell.addClass("myclass" + j);
                                  row.append(cell);
                              }
                              table.append(row);
                              //table.append("&lt;td&gt;&lt;input type='text' name='object'&gt;&lt;/td&gt;&lt;td&gt;&lt;input type='text' name='attr'&gt;&lt;/td&gt;");
                          }
                          $("#dvCSV").html('The Customer Mappings are:');
                          $("#dvCSV").append(table);
                          $('#dvCSV table').addClass("dvCSV1");
                          //  $('#dvCSV table').find('td:eq(10),th:eq(10)').remove();
                          //  $('#dvCSV table').find("td").last().remove();
                          $('#dvCSV table').find('td.myclass10,th.myclass10,td.myclass9,th.myclass9').remove();
                          //  $("#dvCSV").append("&lt;td&gt;&lt;input type='text' name='object'&gt;&lt;/td&gt;&lt;td&gt;&lt;input type='text' name='attr'&gt;&lt;/td&gt;");
                          // $('#dvCSV table').append('&lt;td&gt;&lt;input type="checkbox" name="cb"/&gt;&lt;/td&gt;');
                      }
                      reader.readAsText($("#fileUpload")[0].files[0]);
                  } else {
                      alert("This browser does not support HTML5.");
                  }
              } else {
                  alert("Please upload a valid CSV file.");
              }
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Here I'm creating a css-class for each cell. Is it possible to copy a particular column to another table's column?</p>