This is a devious and cunning move on my part to boost your self-esteem and confidence. (If I can do that, you may get the probably mistaken feeling that I actually know something about this stuff and can even help you to learn some things about it!)
Well, almost. You need one more little bit of code: document.write();
This tells the Web Browser to display whatever appears inside the parentheses on the computer screen.
You may type the actual words you want (called a literal string) or you may put the name of a variable or variables you have defined within the parentheses. Or a combination of these. All work equally well.
You simply put the commands into your regular HTML like this:
Just click the link above to see this script display in a new window on your computer. You'll also have a copy you can Cut-N-Paste to practice with yourself.
Notice that to combine literal text with a variable, you use a "plus" sign. (You could have also used a comma, but you'll be better off in the long run if you stick to the plus signs)
In the second write to screen, we used a literal HTML call (<P> for paragraph) so that this line would not be concatenated onto the end of the first test line.
© Copyright 1997, John H. Keyes email@example.com