error, pero solo en explorer: "document.getElementById(...)" is null or not an object
Publicado por cesar (1 intervención) el 18/06/2015 01:58:41
Marca error pero solo en EXplorer, en mozilla y firefox funciona perfecto., alguien sabe como corregirlo en explorer?
error: 'document.getElementById(...)' is null or not an object
error: 'document.getElementById(...)' is null or not an object
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<script>
var index=0;
var imagenes=new Array( 'FS/PS.jpg', 'FS/PSconta.jpg' , 'FS/PSti.jpg' );
var imagen
function rotarImagenes()
{
// var index=Math.floor((Math.random()*imagenes.length)); // Para Obtener un numero aleatorio
if (index>2) {index=1;}
else {index++;}
document.getElementById('imagen').src=imagenes[index-1];
}
onload=function()
{
rotarImagenes();
setInterval(rotarImagenes,7000);
}
</script>
Valora esta pregunta


0