javascript - How can I add content to a page after opening the link in a new window/tab? -


i'm trying add content page opened in new tab/window, , nothing seems happening. here of code:

var newwindow = window.open('/window'); newwindow.document.body.innerhtml += '<div>this test</div>'; 

any ideas?

as have tagged jquery:

var w = window.open(); var html = '<div>this test</div>'; $(w.document.body).html(html); 

demo


Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -