Javascript Lesson Two ctd.

This program allows you to choose two numbers which you want to multiply together. Type your numbers into the first two boxes, then click on the button.
First NumberSecond Number

By using para2.innerHTML instead of para2.innerTEXT, it is possible to change more than just the text of the paragraph: the style of it can be modified too by putting extra HTML code into it.

You can have as many interactive paragraphs in a Web page as you like: each one needs a different name so that it can be used like a JavaScript variable.

Watch this when you click on the button!

You can see that only one paragraph is affected by the change.