LESSON 10 – NEW EVENTS (SIMPLE ANIMATION)

 

WORK

 

QUESTION 1

 

Create a 4 button menubar.  Each button is a mouseover button created using javascript.  The last example in the note provides you with an example of a single mouseover button.

 

QUESTION 2

 

Download 10 images that are about the same size.  (Resize them if necessary.)

 

Create a webpage that randomly displays one of the images. 

 

Add the javascript needed to change the image when you click on it.  The new image should be randomly selected out of all 10 images.

 

The following code should give you an idea how to do this:

 

var x = Math.random();

if (x < 0.1)

{

   show image 1

}

else if (x < 0.2)

{

   show image 2

}