Monday, 9 September 2013

Create an iframe and populate it with a document at the same time

Create an iframe and populate it with a document at the same time

Is it possible to create an iframe, but not use iframe's src attribute to
fill it with another document, and instead use a string (or a domelement)?
So, something like:
<iframe></iframe>
$('iframe').append("<html><head></head><body>hi</body></html>");

No comments:

Post a Comment