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