title: get all content of div including content of iframes using javascripts not jquery
body: <p>I Have a div something like this</p>
  
  <pre><code>&lt;div id="tid"&gt;
     &lt;iframe&gt;
         &lt;html&gt;
             &lt;body&gt;
             &lt;scripts&gt;&lt;/scripts&gt;
             &lt;iframe&gt;...
                //more content
             &lt;ifram&gt;
             &lt;/body&gt;
         &lt;/html&gt;
     &lt;/iframe&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to get below using javascript. </p>
  
  <pre><code>&lt;iframe&gt;
      &lt;html&gt;
          &lt;body&gt;
             &lt;scripts&gt;&lt;/scripts&gt;
                 &lt;iframe&gt;...
                    //more content and cannot guess how many iframes are there.
                &lt;ifram&gt;
           &lt;/body&gt;
       &lt;/html&gt;
  &lt;/iframe&gt;
  </code></pre>
  
  <p>InnerHtml only return first iframe only. I tried with .contentDocument.getElementsByTagName('body')[0].innerHTML. but this only return first iframe. I want get all the content into string variable without using jquery. </p>
  
  <p>Thanks</p>