write
Description
The write of Document for JS adds the given string(s) to the Document's input stream.
Throws an "InvalidStateError" DOMException when invoked on XML documents.
Throws an "InvalidStateError" DOMException if the parser is currently executing a custom element constructor.
Syntax
document.write(...text)
Parameters
text
A string.
Examples
1 · text · single
2 · text · multiple
3 · multiple calls
4 · `
Links
Related
Document
- adoptNode
- body
- characterSet
- close
- compatMode
- contentType
- cookie
- createCDATASection
- createComment
- createDocumentFragment
- createElement
- createElementNS
- createProcessingInstruction
- createTextNode
- currentScript
- defaultView
- designMode
- dir
- doctype
- Document
- documentElement
- documentURI
- domain
- embeds
- exitPictureInPicture
- forms
- getElementsByClassName
- getElementsByName
- getElementsByTagName
- getElementsByTagNameNS
- hasFocus
- head
- hidden
- images
- implementation
- importNode
- lastModified
- links
- location
- onreadystatechange
- onvisibilitychange
- open
- parseHTMLUnsafe
- pictureInPictureEnabled
- plugins
- readyState
- referrer
- scripts
- title
- URL
- visibilityState
- writeln