Duda de codigo.
Publicado por Javier (2 intervenciones) el 06/11/2019 11:43:02
Llevo unos días dándole vueltas la este código y no encuentro el error. A través de Windows .onload consigo ejecutar la función tipoflor. Pero cuando pongo todo el código en ningún momento me deja ejecutar manejaflor, si me podeis ayudar :-).
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
<script>
var imagen;
function tipoflor()
{
alert("pensamientos");
}
function manejaflor()
{
imagen=document.getElementsByTagName("img")[0];
imagen.addEventListner("mouseover", crecer , false);
imagen.addEventListner("mouseout", menguar , false);
imagen.addEventListner("click", tipoflor , false);
}
function crecer()
{ imagen.height =250;
imagen.width=250;
}
function menguar()
{ imagen.height =200;
imagen.width=200;
}
window.onload=manejaflor;
</script>
</head>
<body>
<p> <img src="bola.jpg"></p>
</body>
Valora esta pregunta


-1