<script type="text/javascript">
var txt1 = "This is a new window.";
var txt2 = "This is a test.";
win.document.open("text/html","replace");
win.document.writeln(txt1);
win.document.write(txt2);
<script type="text/javascript">
var win=window.open('','','width=200,height=200');