title: Copy innerHTML of an iframe within another iframe
body: <p>I stumbled a website like this, let's call it <code>home.html</code></p>
  
  <pre><code>&lt;body&gt;
  &lt;iframe id='id1' src="1.html"&gt;
  &lt;/iframe&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>In <code>1.html</code>, we got</p>
  
  <pre><code>&lt;body&gt;...
  &lt;iframe id='id2' src="2.html"&gt;
  &lt;/iframe&gt;
  ...
  &lt;/body&gt;
  </code></pre>
  
  <p>How can I get the HTML content of <code>2.html</code> with JavaScript? The reason I do not go directly to <code>2.html</code> to get the content is because the content is simply a template and get changed dynamically at the <code>home.html</code></p>
  
  <p>Usually, i would just do like below to get the content of an iframe id but it doesn't work in this case.</p>
  
  <pre><code>var e = document.getElementById('myid').html;
  </code></pre>
  
  <p>Thank you.</p>