Rotating Images

Rotating Images - Rotating Images 5/25/10 2:25 PM Rotating...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
5/25/10 2:25 PM Rotating Images Page 1 of 1 http://www-rcf.usc.edu/~trinagre/itp104/lectures/RotatingImages.html Rotating Images There is not an "easy" way to rotate through images using Dreamweaver, but I have some code you can add. 1. Add javascript code in the head element 2. Add or change the onload attribute in the body tag 3. Add an image in your HTML page 4. Example Add javascript code in the head element You put the following javascript code within the head element in the <script language="javascript" type="text/javascript"> section. <script language="javascript" type="text/javascript"> seconds = "2"; function imgOne() { document.myimg.src = 'images/image1.jpg'; setTimeout("imgTwo()", seconds * 1000); } function imgTwo() { document.myimg.src = 'images/image2.jpg'; setTimeout("imgThree()", seconds * 1000); } function imgThree() { document.myimg.src = 'images/image3.jpg'; setTimeout("imgOne()", seconds * 1000); } </style> Add or change the onload attribute in the body tag
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 05/25/2010.

Ask a homework question - tutors are online