Ver Mensaje Individual
  #8 (permalink)  
Antiguo 27/06/2010, 14:13
Avatar de Adler
Adler
Colaborador
 
Fecha de Ingreso: diciembre-2006
Mensajes: 4.671
Antigüedad: 17 años, 4 meses
Puntos: 126
Respuesta: contenido segun imagen

Hola

Estaría bien que al final te decidieras. Prueba con esto

Código Javascript:
Ver original
  1. <html>
  2. <style type="text/css">
  3. .ocultar {display:none;}
  4. .mostrar {display:block;}
  5. </style>
  6. <script type="text/javascript">
  7. var visto_subm = null;
  8. function funcion(val) {
  9. obj = document.getElementById(val +'_show');
  10. obj.className = (obj==visto_subm) ? 'ocultar' : 'mostar';
  11. if (visto_subm != null) {
  12. visto_subm.className = 'ocultar';
  13. }
  14. visto_subm = (obj==visto_subm) ? null : obj;
  15. }
  16. </script>
  17. <head>
  18. </head>
  19. <body>
  20. <a id="nombre" href="#" onclick="funcion(this.id)">Nombre</a>
  21. <a id="apellido" href="#" onclick="funcion(this.id)">Apellido</a>
  22.  
  23. <div id="nombre_show" class="ocultar">
  24. Se está mostrando el nombre
  25. </div>
  26.  
  27. <div id="apellido_show" class="ocultar">
  28. Se está mostrando el apellido
  29. </div>
  30. </body>
  31. </html>

Suerte
__________________
Los formularios se envían/validan con un botón Submit
<input type="submit" value="Enviar" style="background-color:#0B5795; font:bold 10px verdana; color:#FFF;" />