Ver Mensaje Individual
  #4 (permalink)  
Antiguo 03/04/2009, 07:58
Avatar de Panino5001
Panino5001
Me alejo de Omelas
 
Fecha de Ingreso: mayo-2004
Ubicación: -34.637167,-58.462984
Mensajes: 5.148
Antigüedad: 20 años
Puntos: 834
Respuesta: Ocultar/mostrar elementos ¡Con imágenes!

Es casi lo mismo:
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<
title>test</title>
<
script>
function 
toggle(el,im){
    
el.style.display=el.style.display!='none'?'none':'block';
    
im.src=el.style.display=='none'?'mas.gif':'menos.gif';
}
</script>
</head>

<body>
<div style="cursor:pointer" onclick="toggle(document.getElementById('capaAOcultar'),this.childNodes[0])"><img src="menos.gif" width="12" height="12" /> titulo</div><div id="capaAOcultar">bla bla bla bla </div>
</body>
</html>