Ver Mensaje Individual
  #3 (permalink)  
Antiguo 12/01/2009, 07:38
Avatar de uselox
uselox
 
Fecha de Ingreso: agosto-2008
Ubicación: Lima, Perú
Mensajes: 168
Antigüedad: 16 años, 5 meses
Puntos: 12
Respuesta: Mostrar/Ocultar DIVS JS

Código HTML:
<html>
 <head>
  <title>Aprendiendo Javascript</title>
  <style type='text/css'>
  .mostrar {display:none}
  </style> 
  <script language='javascript'>
  var mostrar = document.getElementById("mostrar");
  </script>
 </head>
 <body bgcolor='#000000'>
  <a href='javascript:;' onclick='document.getElementById("mostrar").className=""'>Mostrar</a>
  <table border='1' cellspacing='0'>
   <tr>
    <td>
     <div id='mostrar' style='color:red;border:solid #cdcdcd 

1.5px;top:50%;left:50%;position:absolute;width:200px;height:200px' class='mostrar'>
      <div style='cursor:default;background-color:#CDCDCD;top:50%;width:15px;height:15px;' 

onclick='document.getElementById("mostrar").className="mostrar"'>X</div>
      Link : <input type='text' value=''/>
     </div>
    </td>
   </tr>
    <td>
     <img width='100' height='100'/>
    </td>
   </tr>
  </table>
 </body>
</html>