title: How to copy iframe content to div?
body: <p>See code snippet below. I want the output text in the iframe to show in the #source div. I’m struggeling with this, and am grateful for any ideas. How can I copy the output text in the iframe to a div?
  (The script writes "Can see text!" in div #show if div #sourcediv contains "Text", else "Cannot see text!".)</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
  &lt;body&gt;
  
  &lt;div id="source"&gt;&lt;/div&gt;
  &lt;div id="show"&gt;&lt;/div&gt; 
  
  &lt;script&gt; 
  if (document.getElementById('source').innerHTML.indexOf("Text") != -1)
  {document.getElementById('show').innerHTML="Can see text!";}
  else{document.getElementById('show').innerHTML="Cannot see text!";}
  &lt;/script&gt;
  
  &lt;iframe id="iframe" src="http://majaulrika.esy.es/text.txt"&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>