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
<html>
<body>
<script type="text/javascript">
document.write("Hello World!")
</script>
</body>
</html>
|
Try-It-Yourself Demos
Use
document.write() to write text to the output
Use
document.write() to write text with formatting to the output
Use
document.write() with several expressions
Complete Document Object Reference
|
|
|