Resources
- //INPUT: Detecting mouseovers
- //PROCESS: Randomness and rounding
- //HTML and OUTPUT: Unicode dice
Saving your work
Use Save as...
to save the
empty template as
"2.11S-RollSomeDice-LastName.html
"
in your Computer Programming 12 directory.
The assignment
Create a program that uses Javascript makes a random image appear when someone mouses over something.
- Create a page with instructions on what element to roll over
-
Add an id and a
onmouseover
event to that element - Create a function that will randomly roll a die
- Make a different image or symbol appear depending on which number is rolled.
For example
Mouse over the question mark to roll a die...