JSREF

HTML DOM Document close()

Open a document, write some text to it, and close it: