javascript open new window with html content

JavaScript
var newWin = open('url','windowName','height=300,width=300');
newWin.document.write('html to write...');

Source

Also in JavaScript: