links en imagenes
Publicado por santi (1 intervención) el 17/07/2006 18:24:31
Agradecería me indicáseis como puedo incluir links en la rotación de imágenes. Son imagenes que cada vez que se carga la página van rotando y me gustaría que cada imagen pudiese incoporar su propio link onclick.
Os adjunto el script de la rotación: ¿Cómo incluyo los links?. Muchas Gracias
<script type="text/JavaScript">
<!--
function VecImagenes()
{
n=0;
this[n++]="http://www.gonefishing.es/images/Mophie/recharge_portada_2.jpg";
this[n++]="http://www.gonefishing.es/images/Mophie/radio_portada_2.jpg";
this[n++]="http://www.gonefishing.es/images/Mophie/ratchet_portada_2.jpg";
this[n++]="http://www.gonefishing.es/images/Mophie/run_portada_2.jpg" onclick="http://www.gonefishing.es/detallesRunNano.php";
this[n++]="http://www.gonefishing.es/images/Mophie/remote_portada_2.jpg";
this[n++]="http://www.gonefishing.es/images/Mophie/Rest_portada_2.jpg";
this[n++]="http://www.gonefishing.es/images/Mophie/ramp_portada_2.jpg";
this.N=n;
}
var Imagenes=new VecImagenes();
src= Imagenes[ Math.floor(Math.random() * Imagenes.N) ] ;
document.write("<IMG SRC="+src+">");
//-->
</script
Os adjunto el script de la rotación: ¿Cómo incluyo los links?. Muchas Gracias
<script type="text/JavaScript">
<!--
function VecImagenes()
{
n=0;
this[n++]="http://www.gonefishing.es/images/Mophie/recharge_portada_2.jpg";
this[n++]="http://www.gonefishing.es/images/Mophie/radio_portada_2.jpg";
this[n++]="http://www.gonefishing.es/images/Mophie/ratchet_portada_2.jpg";
this[n++]="http://www.gonefishing.es/images/Mophie/run_portada_2.jpg" onclick="http://www.gonefishing.es/detallesRunNano.php";
this[n++]="http://www.gonefishing.es/images/Mophie/remote_portada_2.jpg";
this[n++]="http://www.gonefishing.es/images/Mophie/Rest_portada_2.jpg";
this[n++]="http://www.gonefishing.es/images/Mophie/ramp_portada_2.jpg";
this.N=n;
}
var Imagenes=new VecImagenes();
src= Imagenes[ Math.floor(Math.random() * Imagenes.N) ] ;
document.write("<IMG SRC="+src+">");
//-->
</script
Valora esta pregunta


0