document.write()
Discouraged
This feature is discouraged. Consider using DOM instead. For the rationale, see:
The document.open()
, document.write()
, document.writeln()
, and document.close()
methods write content to a document, possibly while that document is still loading.
Learning resources on MDN
- Document: close() method
- Document: open() method
- Document: write() method
- Document: writeln() method
Browser support
- Chrome 45 Released on 2015-09-01
- Chrome Android 45 Released on 2015-09-01
- Edge 12 Released on 2015-07-29
- Firefox 69 Released on 2019-09-03
- Firefox for Android 79 Released on 2020-07-28
- Safari 11 Released on 2017-09-19
- Safari on iOS 11 Released on 2017-09-19
Specifications
- HTML, from HTML Workstream (WHATWG).
View web-platform-tests results for this feature - View the feature source file - Edit the feature - Report an issue about this feature