Ver Mensaje Individual
  #4 (permalink)  
Antiguo 09/02/2007, 09:06
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 23 años
Puntos: 772
Re: Mostrar Tabla A Partir De Un Radio

Hola lrunge

Prueba este ejemplo:

Código PHP:
<html>
<
head>
<
script type="text/javascript">
function 
mostrar(num) {
  
document.getElementById('tabla1').style.display = (num==1) ? 'block' 'none';
  
document.getElementById('tabla2').style.display = (num==2) ? 'block' 'none';
}
</script>
</head>
<body>
<input type="radio" name="rad" checked="checked" onclick="mostrar(1)" />
<input type="radio" name="rad" onclick="mostrar(2)" />
<table id="tabla1">
<tr><td>Texto 1</td></tr>
</table>
<table id="tabla2" style="display:none">
<tr><td>Texto 2</td></tr>
</table>
</body>
</html> 
Saludos,