title: How do I get the original innerHTML source without the Javascript generated contents?
body: <p>Is it possible to get in some way <strong>the original HTML source</strong> without the changes made by the processed Javascript? For example, if I do:</p>
  
  <pre><code>&lt;div id="test"&gt;
      &lt;script type="text/javascript"&gt;document.write("hello");&lt;/script&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>If I do:</p>
  
  <pre><code>alert(document.getElementById('test').innerHTML);
  </code></pre>
  
  <p>it shows:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;document.write("hello");&lt;/script&gt;hello
  </code></pre>
  
  <p>In simple terms, I would like the <code>alert</code> to show only:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;document.write("hello");&lt;/script&gt;
  </code></pre>
  
  <p>without the final <code>hello</code> (the result of the processed script).</p>