javascript close() method
Translation results:
英[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() methodsyntax
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() methodexample
<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
Popular Recommendations
- Crypto Kingmaker in Close Contests
- Dogecoin (DOGE) Is Close to a Rare Macro Golden Cross, Trader Kevin Predicts
- VanEck to Close and Liquidate Ethereum Futures ETF (EFUT), Signaling a Setback for ETH
- VanEck to Close Its Ethereum Futures Exchange-Traded Fund (ETF) EFUT, Citing Performance and Liquidity
- VanEck to Close Its Ethereum Strategy ETF, Following the Liquidation of Its Bitcoin Strategy ETF
- Four Lesser-Known Cryptocurrencies Show Promise for Substantial Gains as the Year Draws to a Close