MMDT1022 HTML II and Javascript
Week 2
Week 2 Read chapter 3 in the JavaScript textbook. Instructor will explain scope of variables. Two levels, Global and Local scope. Standard BINGO from the book. Buzzwords BINGO from the book. |
Lab Multiplication Table Here is an example of using a for loop to create a multiplication table. This is the finished lab called multtable. (Password protected. Only viewable live and in the recording) Here is an advanced version that asks for the table size called multtable. (Password protected.) Part 1 - Using for loops, create a multiplication table. Generate a HTML table on the fly as to create a nice looking table with alternating colored rows. There should be at least 10 rows by 10 columns. Part 2 - Create an event handler function so that when you click on a cell, the cell background color changes. Part 3 - Create an event handler function so that when your mouse leaves the selected cell, the background color changes back to the original color. Part 4- Generate a message that shows which row and column was selected and what data the cell contained.
Assignment is due one week from when it was assigned. 50% penalty if late. |