HTML DOM close()


The DOM's close() function helps finish writing on a window. It shows that we're done writing. You don't need to give any extra information when using close().

Syntax:

document.close()

Example 1: Example of DOM close() method.