# document.write (out-of-line) test

This test uses the open, write and close methods of a document to construct a document. It tests the "out-of-line" capabilities of document.write i.e. the ability to use document.write to create an entirely new document.

Use this button to create a new window. If one already exists, we'll use it.

Use this button to write the new value of a counter into the document. If the document was previously closed, it will be reopened (and the old contents will be destroyed.

Use this button to close the document. Subsequent writes will rewrite the document.