Suche nach als

Diashow Manuell

Auf dieser Seite:

Diese Diashow läuft nicht automatisch, zum Bildwechsel muss einer der beiden Richtungspfeile angeklickt werden. Diese Show läuft auch mit gemischten Bildern dank des Arrays.

Slideshow

<<        >>

Vorwärts und Rückwärts

new Array()

<script type="text/javascript">
// Variablen
myPix = new Array("images/1.gif","images/2.gif","images/3.gif","images/gelb_4.gif");
thisPic = 0;
imgCt = myPix.length - 1;
// Funktion
function chgSlide(direction) {
  if (document.images) {
    thisPic = thisPic + direction;
    if (thisPic > imgCt) {
      thisPic = 0;
    }
    if (thisPic < 0) {
      thisPic = imgCt;
    }
    document.myPicture.src=myPix[thisPic];
  }
}
</script>

HTML:

<a href="javascript:chgSlide(-1)"><<</a>
        
<a href="javascript:chgSlide(1)">>></a>

 


Valid XHTML 1.0 Check den Code.

Diashow manuell/auto >> << Diashow Auto
Ich bin hier: > JavaScript Lehrling >>> Diashow Manuell
 
HTML und XHTML | CSS | JavaScript und DHTML | PHP und MySQL | Andere Sprachen
Letzter Update: 29.01.2010