![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
08/12/2006, 01:35
|
![Avatar de chalchis](http://static.forosdelweb.com/customavatars/avatar36932_1.gif) | | | Fecha de Ingreso: julio-2003
Mensajes: 1.773
Antigüedad: 21 años, 6 meses Puntos: 21 | |
Re: Como cambiar imagenes al dar clik sobre ella. !!! utilze algo asi pero era cuando mostraba un div es decir si el div esta visible se cambia la imagen si no cambia a otra imagen
function cambio(cual,el)
{
var elhtml2 = document.getElementById(el);
if (document.getElementById(cual).style.display == 'none')
{
document.getElementById(cual).style.display = 'block';
elhtml2.src = '../Imagen/Insumos_img/arriba.gif';
}
else
{
document.getElementById(cual).style.display = 'none';
elhtml2.src = '../Imagen/Insumos_img/abajo.gif';
}
}
<img src="../Imagen/Insumos_img/abajo.gif" width="16" height="16" id="c1" onclick="cambio('Tester1','c1')" style="cursor:pointer">
saludos espero te de una idea
__________________ gerardo |