title: Javascript Print iframe contents only
body: <p>This is my code</p>
  
  <pre><code>&lt;script&gt;
  var body = "dddddd"    
  var script = "&lt;script&gt;window.print();&lt;/scr'+'ipt&gt;";
  
  var newWin = $("#printf")[0].contentWindow.document; 
  newWin.open();
  newWin.close();
  
  $("body",newWin).append(body+script);
  
  &lt;/script&gt;
  &lt;iframe id="printf"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>This works but it prints the parent page, how do I get it to print just the iframe? </p>