Monday, February 2, 2015

Javascript slide show

<SCRIPT>var myPix = new Array("images/pathfinder.gif", "images/surveyor.gif", "images/surveyor98.gif");
var thisPic = 0;
function processPrevious() {
     if (document.images && thisPic > 0) {
          thisPic--;
          document.myPicture.src = myPix[thisPic];
     }
}
function processNext() {
     if (document.images && thisPic < 2) {
          thisPic++;
          document.myPicture.src = myPix[thisPic];
     }
}
</SCRIPT>
<IMG SRC="images/pathfinder.gif" NAME="myPicture">
<HREF="javascript:processPrevious()">Previous</A>
<
HREF="javascript:processNext()">Next</A>

No comments:

Post a Comment