Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/11/2011, 10:23
gus_anomaly
 
Fecha de Ingreso: noviembre-2009
Mensajes: 381
Antigüedad: 15 años, 4 meses
Puntos: 6
Ocultamiento de tablas

Hola gente, como va?
Una consulta:

Si hago esto, porque no funciona?

Código:
<html>
<head>
	<script languaje="Javascript">
		document.write('<style type="text/css">div.ocultable{display: none;}</style>');
		function MostrarOcultar(capa,enlace)
		{
			if (document.getElementById)
			{
				var aux = document.getElementById(capa).style;
				aux.display = aux.display? "":"block";
			}
		}
	</script>
</head>
<body>
	<table>
			<tr>
				<td>Hola<br />
			</tr>	
			<tr>
				<td>Hola<br />
			</tr>	
			<tr>
				<td>Hola<br />
			</tr>				
		<div class="ocultable" id="ocultTable">
			<tr>
				<td>Hola<br />
			</tr>	
			<tr>
				<td>Hola<br />
			</tr>
		</div>
	</table>
		<a href="javascript:MostrarOcultar('ocultTable');" id="enlace1"> Mostrar/Ocultar</a>	
</body>
</html>
Muchas gracias!
Gustavo.