Este codiso para slideshow randomico é muito bom, porém eu gostaria de incluir links em suas imagens, alguem poderia me ajudar?
Tentei uncluir o link no codigorandomimages[0]="1.jpg"
randomimages[0]=["1.jpg","http://www.enredeco.com.br"];
Desde já, muito obrigado.
<script language="javascript">
/*
Random image slideshow- By Tyler Clarke ([email removido])
For this script and more, visit http://www.javascriptkit.com
*/
var delay=1000 //set delay in miliseconds
var curindex=0
var randomimages=new Array()
randomimages[0]="1.jpg"
randomimages[1]="5.jpg"
randomimages[2]="2.jpg"
randomimages[3]="4.jpg"
randomimages[4]="3.jpg"
randomimages[5]="6.jpg"
var preload=new Array()
for (n=0;n<randomimages.length;n++)
{
preload[n]=new Image()
preload[n].src=randomimages[n]
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">')
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0? 1 : curindex-1
}
else
curindex=tempindex
document.images.defaultimage.src=randomimages[curindex]
}
setInterval("rotateimage()",delay)
</script>
<p align="center">This free script provided by<br />
<a href="http://javascriptkit.com">JavaScript
Kit</a></p>