topical media & game development

talk show tell print

basic-javascript-09-Adverts.htm / htm

  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  <script language=JavaScript type="text/javascript">
  var currentImgNumber = 1;
  var numberOfImages = 3;
  function window_onload()
  function switchImage()
     document.imgAdvert.src = "AdvertImage" + currentImgNumber + ".jpg";
     if (currentImgNumber < numberOfImages)
        setTimeout("switchImage()",3000);   }
  <body onload="window_onload()">
  <img src="AdvertImage1.jpg" name="imgAdvert">

(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.