I want open a new window:
var my = window.open('iframe.html', '_blank' ,"height=600, width=600");
but just when open it, I want modify its DOM, I have tried:
var div = my.document.createElement("div");
div.innerHTML = "Hello!";
my.document.body.appendChild( div );
or:
var div = $('<div>Hello World</div>');
$(my).contents().find('body').append(div);
Both of them doesn't work;
So is it possible modify my iframe DOM when I open it?