1. Home
  2. Computing & Technology
  3. JavaScript

Slide Show

3. Add to Your Paget

clr gif
Join the Discussion

Questions? Comments?

More of this Feature

Introduction Obtain the Script

All that remains to be done now is to add the images into your web page.

The image tag that you add to the page is coded to display the first image in the slide show as if it were the only image you are going to display. The only change that you need to make is to name the image so that the script can update the image. You then add to it the previous and next links that call the prevImg and nextImg functions defined in the Javascript code you have already added to the page.

Here is the code for my sample slide show:

<p align="center">img src="graphics/pic1a.gif" width="150" height="150" border="0" alt="Slide Show images" name="rollimg" /><br />
<a href="javascript:prevImg()">Previous</a>
<a href="javascript:nextImg()">Next</a>
</p>
Sample Page | Obtain the Script | Add to Your Page
Explore JavaScript
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2009 About.com, a part of The New York Times Company.

All rights reserved.