HTML - soy principiante, tengo 50 lineas y no encuentro error

 
Vista:
sin imagen de perfil

soy principiante, tengo 50 lineas y no encuentro error

Publicado por carlos avalos (2 intervenciones) el 17/07/2016 18:25:25
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<title>MANEJO DE EVENTOS</title>
	<script>
		var imagen new Array(3);
		function manejaflor() {
			for (var i=0; i<4; i++) {
				imagen[i]=document.getElementsByTagName("img")[i];
			}
		imagen[0].addEventListener("mouseover", function() {imagen[0].width=225; imagen[0].height=225;},false);
		imagen[0].addEventListener("mouseout", function() {imagen[0].width=200; imagen[0].height=200;},false);
		imagen[0].addEventListener("click", flor,false);
		imagen[1].addEventListener("mouseover", function() {imagen[1].width=225; imagen[1].height=225;},false);
		imagen[1].addEventListener("mouseout", function() {imagen[1].width=200; imagen[1].height=200;},false);
		imagen[1].addEventListener("click", flor,false);
		imagen[2].addEventListener("mouseover", function() {imagen[2].width=225; imagen[2].height=225;},false);
		imagen[2].addEventListener("mouseout", function() {imagen[2].width=200; imagen[2].height=200;},false);
		imagen[2].addEventListener("click", flor,false);
		imagen[3].addEventListener("mouseover", function() {imagen[3].width=225; imagen[3].height=225;},false);
		imagen[3].addEventListener("mouseout", function() {imagen[3].width=200; imagen[3].height=200;},false);
		imagen[3].addEventListener("click", flor,false);
		}
 		function crecer() {
			imagen.width=225;
			imagen.height=225;
		}
		function decrecer() {
			imagen.width=200;
			imagen.height=200;
		}
		function flor() {
			alert("pensamientos")
		}
    	window.addEventListener("load",manejaflor,false);
	</script>
</head>
<body>
	<p>
		<!--- &nbsp non-breaking space  --->
		<img src="imagenes/1.jpg">
		<img src="imagenes/2.jpg">
    	<img src="imagenes/3.jpg">
    	<img src="imagenes/4.jpg">
	</p>
</body>
</html>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil

soy principiante, tengo 50 lineas y no encuentro error

Publicado por DAVID (94 intervenciones) el 18/07/2016 10:39:28
Hola,

¿Que mensaje de error te da?

Un saludo,
David
diseño grafico madrid
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
Imágen de perfil de xve
Val: 1.144
Oro
Ha mantenido su posición en HTML (en relación al último mes)
Gráfica de HTML

soy principiante, tengo 50 lineas y no encuentro error

Publicado por xve (1543 intervenciones) el 18/07/2016 11:20:32
Esta linea esta mal:
1
var imagen new Array(3);
tiene que ser:
1
var imagen = new Array(3);
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

soy principiante, tengo 50 lineas y no encuentro error

Publicado por carlos avalos (2 intervenciones) el 18/07/2016 22:26:22
ja ja ja ja ja muchas gracias, me pase 4 horas tratando de detectar el problema
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar