<SCRIPT>
<!-- hide code from old browsers
document.writeln ('My first JavaScript.<br>');
document.writeln("This is FUN!<br>");
//end hiding code -->
</SCRIPT>
RESULTS:
My
first JavaScript. This is FUN!
Yawn...
this is may not seem all that exciting, but it is an important lesson!
You learned:
Java
code is written between the <SCRIPT> tags
Java
code should be written between HTML comment tags
Java
statements end with a semicolon(;)
HTML
statements (i.e. <BR> ) work the same in Java statements as
they do in a HTML document, but they must be placed in the string
(within the quotes)
It
doesn't matter if you use single quotes (')or double quotes ("), the
browser reads them the same way.
Put
the Java statement where you want the text to be in your HTML document