title: How to get full source code from an iframe with javascript or jquery?
body: <p>I am helpless. I need to get the source code from an iframe with Javascript or Jquery. </p>
  
  <p><strong>The source file of the iframe is in the same domain</strong>. Here is my iframe:</p>
  
  <pre><code>&lt;iframe src="/source_file.html" id="iframe_id"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>I am using the following <strong>so famous syntax</strong> to get the source code from the iframe:</p>
  
  <pre><code>document.getElementById("iframe_id").contentWindow.document.body.innerHTML
  </code></pre>
  
  <p>But with this code, I am only able to get the code inside BODY element. I want to get full code from <strong>&lt;!doctype html&gt; to &lt;html&gt;</strong>.</p>
  
  <p>Please help me.</p>