|
|
|
|
|
write
Writes a string of text to a document stream opened by document.open()
Syntax
document.write(text)Parameters
text is a string containing the text to be written to the current document.
Example
Notes
You can write to a document that you have not explicitly opened, but writing to a document that you have not explicitly closed will append the text to the document rather than writing to an empty document.
The text you write is parsed into the document's structure model, but only as text. The H1 element in the example above, for example, is not a node and not a child of the document. When you use document.write(), an HTML node is created as a child of the document, but that HTML node has no children.
Specification
html
| mozilla.org | mailto:oeschger | bug 93108 |
|
|
|
|
|