HTML DOM write() Method
Complete Document Object Reference
Definition and Usage
The write() method writes HTML expressions or JavaScript code to a document.
Note: Multiple arguments (exp1,exp2,exp3,...) can be listed and they
will be appended to the document in order of occurrence.
Syntax
|
document.write(exp1,exp2,exp3,....)
|
Example
Use document.write() to write text to the output:
<html>
<body>
<script type="text/javascript">
document.write("Hello World!")
</script>
</body>
</html>
|
|
Try-It-Yourself Demos
Use document.write() to write text with formatting to the output
Use document.write() with several expressions
Complete Document Object Reference
 |
W3Schools' Online Certification Program
The perfect solution for professionals who need to balance work, family, and career building.
More than 3500 certificates already issued!
|
The HTML Certificate documents your knowledge of HTML, XHTML, and CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
|