Create an – Eric Kigathi Nov 18 '18 at 02:56

0

Accepted answer doesn't work for me, but following solution works:

$('<iframe>', {
    id: 'someId',
    // other options like
    frameborder: 0,
    scrolling: 'no'
}).appendTo('#someDiv').on('load', function () {
    $(this).contents().find('body').append(response);
});
Mehdi Dehghani
  • 10,970
  • 6
  • 59
  • 64