IVO_24 de Abril del 2006
PreguntaHe hecho un script para que cada vez que se entre en mi web, ponga una imagen aleatoriamente, el problema esta en que con el iexplore no funciona, siempre sale la misma imagen, en cambio, con firefox funciona a la perfeccion. ahi os dejo el codigo a ver si alguien me sabe ayudar:
<html>
<head>
<title>Enlace Aleatorio</title>
</head>
<body onload="imagenAleatoria()">
<script>
var imagenes = new Array("foto1.jpg", "foto2.jpg", "foto3.jpg")
function imagenAleatoria(){
aleat = Math.random() * (imagenes.length - 1);
aleat = Math.round(aleat);
document.writeln("<img src="" + imagenes[aleat] + "">");
}
</script>
</body>
</html>
<html>
<head>
<title>Enlace Aleatorio</title>
</head>
<body onload="imagenAleatoria()">
<script>
var imagenes = new Array("foto1.jpg", "foto2.jpg", "foto3.jpg")
function imagenAleatoria(){
aleat = Math.random() * (imagenes.length - 1);
aleat = Math.round(aleat);
document.writeln("<img src="" + imagenes[aleat] + "">");
}
</script>
</body>
</html>
