Enter the swap.html text from Figure 5.8 into a new Web page, then load the page in

Question:

Enter the swap.html text from Figure 5.8 into a new Web page, then load the page in the browser to verify that it behaves as described.

Modify the page so that it has a third image to the right of the existing images. In place of the single button labeled Swap Images, there should be two buttons on the page, labeled Rotate Left and Rotate Right. When the user clicks on the Rotate Left button, the SRC attributes of the images should be changed so that each image is shifted to the left (and the image originally at the far left is rotated around to the right). For example, if the three images were initially the three faces happy-­‐sad-­‐surprised (from left-­‐to-­‐right), clicking the Rotate Left button would result in the sequence sad-­‐surprised-­‐happy. Conversely, clicking on the Rotate Right button should shift the images to the right (with the rightmost image rotating around to the left)?


Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: