title: Loading iframe with content in textbox
body: <p>I have made a textbox and an iframe in the same html. I want to load the 'html' rendered from textbox into html. I am using javascript button click event, but nothing is getting rendered. Pls help, I cant find where I am making mistake! </p>
  
  <p>HTML: </p>
  
  <pre><code>&lt;button onClick="convert()"&gt;Run&lt;/button&gt; 
  
  &lt;textarea id="mycode"&gt;
      Hello World!
  &lt;/textarea&gt;
  
  &lt;iframe id="display"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>Javascript: </p>
  
  <pre><code>function convert()
  {
     var x = document.getElementById('mycode').value;
     document.getElementById('display').innerHTML = x;
  }
  </code></pre>
  
  <p>Can someone help, what's wrong ?</p>