Javascript close() Method
Javascript close() Definition and Usage
The close() method closes the output stream and displays the sent data.
Javascript close() Syntax
Javascript close() Example
<html>
<head>
<script>
function createNewDoc()
{
var newDoc=document.open("text/html","replace")
var txt="<html><body>Learning about the DOM is FUN!</body></html>"
newDoc.write(txt) newDoc.close()
}
</script>
</head>
<body>
<input type="button" value="Open and write to a new document" onclick="createNewDoc()">
</body>
</html> |
|