write()

This method is used to write content to the window or frame. When used with the document.write() statement, a document.close() statement is needed to close the output stream to the window or frame.

syntax:

document.write(content)

The write() method is used with the following:

document