var preloadedimages=new Array() for (i=0;i<photos.length;i++){ preloadedimages[i]=new Image() preloadedimages[i].src=photos[i] }
function applyeffect(){ if (document.all){ photoslider.filters.revealTrans.Transition=Math.floor(Math.random()*23) photoslider.filters.revealTrans.stop() photoslider.filters.revealTrans.apply() } }
function playeffect(){ if (document.all) photoslider.filters.revealTrans.play() }
function keeptrack(){ window.status="Image "+(which+1)+" of "+photos.length }
function backward(){ if (which>0){ which-- applyeffect() document.images.photoslider.src=photos[which] playeffect() keeptrack() } }
function forward(){ if (which<photos.length-1){ which++ applyeffect() document.images.photoslider.src=photos[which] playeffect() keeptrack() } }
function transport(){ window.location=photoslink[which] } </script> 注意代码中的描述文字,用户可相应改动代码! 可以增减图片和添加图片链接。 在页面<body>的相应位置,加入代码: <script> if (linkornot==1) document.write('<a href="javascript:transport()">') document.write('<img src="'+photos[0]+'" name="photoslider" style="filter:revealTrans(duration=2,transition=23)" border=0>')