How would I use JavaScript to launch a new window that either contains the output of a variable or custom text? Kind of like taking the results of the document.open()
command and showing it in a new window. My code:
function readmessage()
{
var doc = document.open("text/html");
var txt = "HELLO WORLD";
doc.write(txt);
doc.close();
}
readmessage();
What would be the best way to achieve this in a new window? Is this possible?