Ver Mensaje Individual
  #17 (permalink)  
Antiguo 26/06/2010, 15:44
bolt87
 
Fecha de Ingreso: mayo-2009
Mensajes: 67
Antigüedad: 15 años
Puntos: 0
Respuesta: hola a todos, me gustaria saber si se puede hacer que las imagenes vayan r

<html>
<head>
<title>Rotador de publicidad</title>
<script type="text/javaScript">
var publicidad = ["img/rotacion/masqbelleza1.jpg", "masqbelleza2.jpg", "masqbelleza3.jpg", "masqbelleza4.jpg"];
var direccion = ["index.php", "index.php", "index.php", "index.php"];
var texto = ["primera imagen", "segunda imagen", "texto", "texto"];
var contador = 0;
var url = "";
function RotarPublicidad(){

if(contador > 4)
contador = 0;
document.getElementById("publicidad").innerHTML = "<img src="+publicidad[contador]+" width='150px' height='150px' title="+texto[contador]+" border='0px' />"
url = direccion[contador];
document.getElementById("texto").innerHTML = texto[contador];
document.getElementById("publicidad_peq_4").style. background="#FFFFFF";
document.getElementById("publicidad_peq_"+contador ).style.background="#FF0000";
if (contador >= 1)
document.getElementById("publicidad_peq_"+(contado r-1)).style.background="#FFFFFF";
contador++;
}
timer = setInterval("RotarPublicidad()", 2000);
window.onload = RotarPublicidad;
</script>
</HEAD>
<body>
<a href="#" onClick="window.open(url,'Ventana');">
<div id="publicidad"></div>
</a>
<div id="texto"></div>
<table border="1">
<tr>
<td id="publicidad_peq_0">

<img src="img/rotacion/masqbelleza1.jpg" />
</td>
<td id="publicidad_peq_1">
<img src="img/rotacion/masqbelleza2.jpg" />
</td>
<td id="publicidad_peq_2">
<img src="img/rotacion/masqbelleza3.jpg" />
</td>
<td id="publicidad_peq_3">

<img src="img/rotacion/masqbelleza4.jpg" />
</td>
</tr>
</table>
</body>
</html>