英[kləʊz] 美[kloʊz]
adj.Intimate; close; close
vt. Close; end; bring close
vi.Close;off;end
adv.closely
n.end
Third person singular: closes Present participle: closing Past tense: closed Past participle: closed Comparative: closer Superlative: closest
javascript close() method syntax
Function:Close an output stream opened by the document.open method and display the selected data.
Syntax: document.close()
Description: This method will close the document stream opened by the open() method, and Forces all cached output to be displayed. If you use the write() method to dynamically output a document, you must remember to call the close() method when you do so to ensure that all document content is displayed. Once close() is called, write() should not be called again, because this will implicitly call open() to erase the current document and start a new one.
javascript close() method example
<html> <head> <meta charset="UTF-8"> <script type="text/javascript"> function createNewDoc() { var newDoc=document.open("text/html","replace"); var txt="<html><body>学习 DOM 非常有趣!</body></html>"; newDoc.write(txt); newDoc.close(); } </script> </head> <body> <input type="button" value="打开并写入一个新文档" onclick="createNewDoc()"> </body> </html>
Run instance »
Click the "Run instance" button to view the online instance