Hello I'm trying to insert multiple tables into a div.
I have a multiple tables in my document for e.g.
<table>
<tr>
<th>1</th>
<th>2</th>
</tr>
<tr>
<td>1</td>
<td>2</td>
</tr>
</table>
Now I want to select them:
table = document.getElementsByTagName("TABLE");
create div with class "tablediv"
and add each table to "tablediv"
like:
<div class="tablediv">
<table>
...
</table>
</div>
Is it possible with pure js?