
03/10/2005, 13:15
|
 | Moderador extraterrestre | | Fecha de Ingreso: diciembre-2001 Ubicación: Madrid
Mensajes: 6.987
Antigüedad: 23 años, 2 meses Puntos: 61 | |
Más sencillo: Código PHP: <html> <head> <title>Untitled</title> <style> test{ display:none; } </style> <script> function Alternar(Seccion){ cosa=document.getElementById(Seccion).style; cosa.display = (cosa.display=="none")?"":"none" } </script> </head>
<body>
<div id="test" style="display:none"> (esta escondido) </div> <a href="#" onclick="Alternar('test')"> Mostrar div</a> </body> </html>
Un saludo a los dos!!
Por cierto que el parámetro en Alternar debe ir entre comillas!
__________________ Cómo escribir
No hay pregunta tonta, sino tonto que quiere seguir en la ignorancia. |