Richard's JavaScript Tutorials

Updated 07/18/14

Home
Animation
precachedImages
digitalClock
Object Tag (Audio)
Cookies.htm
Math_Object
Using CSS
The Style Object
Client_Info
customObject
functions
UsingArrays
comments
concatenation
documentwrite
ifelse
Loops
forms
Strings
variables

 

Using the document.write() method

This section will show you the basic use of the document.write() method

Simply by adding some text in the document.write("Add text here") method
inside the JavaScript tags (<script type="text/javascript">) the text
added inside the document.write method quotes will be displayed in your browser.
In addition JavaScript terminates statements with a semicolon.

For example:

Here is the code to display the above message:
<script type="text/javascript">
<!-- document.write() method example //-->
document.write("You can display text using this method");
</script>

Now try substituting my code and add your own text to try creating your own javascript code using the document.write() method.

This site was last updated 07/08/14