title: How to create iframe about:blank without src but content html javascript
body: <p>I want to create a iframe without src ( about:blank ) but that iframe content some javascript html</p>
  
  <p>I need to do it because I don't want create a hosted webpages on server for this mission, this will make more connection to server which are no good for resource. And also don't want to write direct javascript html on webpage because they make the webpage load slow most time when load/running.</p>
  
  <p>How to do it by using javascript (jquery maybe )?</p>
  
  <p>iframe eg :</p>
  
  <pre><code>&lt;iframe src="about:blank" width="300" height="250" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" &gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>and its content:</p>
  
  <pre><code>&lt;div&gt;xxx&lt;/div&gt;
  &lt;script type="text/javascript"&gt;var abc=1 &lt;/script&gt;
  &lt;script type="text/javascript" src="http://1234.net/js.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Thanks for some answered following. 
  But I need to clarify that script will create iframe by javascript also, because the need to create iframes in one page with different ids.
  Please look at my test:
  <a href="http://jsfiddle.net/rDkEw/" rel="nofollow">http://jsfiddle.net/rDkEw/</a></p>
  
  <p>The problems are:
  if use <strong>document.body.appendChild</strong>, the iframe will create on body of webpage, but I need it to keep it inside the current div which hold the JavaScript.</p>