Jack Nilan         Javascript Tutorial        EMail : jacknilan@yahoo.com



Lesson 1 - JavaScript - Using document.write


A JavaScript script can run in the <BODY> section of a web page. JavaScript extends the capabilities of HTML and works with HTML to do things you cannot do with HTML alone.

JavaScript code is placed between <SCRIPT> and </SCRIPT> tags.

Following is an example of JavaScript. It uses the document.write() command which takes HTML code and executes it on screen just like it was in the body of an HTML file

<HTML>
<BODY>
<script>
document.write("<p> <h1> This is a test </h1> </p>");
</script >
More HTML code can go here.
</BODY>
</HTML>


Note that the code in the document.write() is in quotation marks.