I have a situation where I need to take data from few columns of a html table and display the data in separate rows.
.new td {border: 1px solid; padding: 2px;}
<div class="new"><table>
<tr>
<td>Name1,Name2,Name3,Name4</td><td>Age1,Age2,Age3,Age4</td><td>M,M,F,M</td>
</tr>
<tr>
<td>Name5,Name6,Name7</td><td>Age5,Age6,Age7</td><td>F,F,F</td></tr>
</table></div>
Now I want to separately change the data from each row to display separately in rows like below on the html page. Here the comma separated values can change in each row with new form submissions.
table td {border: 1px solid; padding: 2px;}
<p>For Row1</p>
<table>
<tr><td>Name1</td><td>Age1</td><td>M</td></tr>
<tr><td>Name2</td><td>Age2</td><td>M</td></tr>
<tr><td>Name3</td><td>Age3</td><td>F</td></tr>
<tr><td>Name4</td><td>Age4</td><td>M</td></tr>
</table>
<p>For Row2</p>
<table>
<tr><td>Name5</td><td>Age5</td><td>F</td></tr>
<tr><td>Name6</td><td>Age6</td><td>F</td></tr>
<tr><td>Name7</td><td>Age7</td><td>F</td></tr>
</table>
Can this be done with Javascript?