Javascript Lesson Two

This program allows you to choose two numbers which you want to multiply together. Type your numbers into the first two boxes (you'll need to click on them first to get a cursor), then click on the button.

First NumberSecond NumberAnswer

The HTML which sets up the table uses the following tags: "thead" (table head); "th" (table heading); "tr" (table row); and "td" (table data). When creating your own tables you can simply copy this format and add extra pairs of "td" and "/td" tags to create more columns, and more "tr" and "/tr" tags for more rows.

Whether you want to collect data input through a table or to use JavaScript to post output into an input box in a table, you will need to use the "document.formname.datacellname.value" construction (though obviously replacing "formname" and "datacellname" with the actual names you use for your table).

If, however, you are posting data into a box in a table which is not an input box (ie. which can't take direct inputs from the reader), then you have to use the cellname.innerHTML construction instead:-