Ver Mensaje Individual
  #18 (permalink)  
Antiguo 09/11/2006, 08:50
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 22 años, 3 meses
Puntos: 772
Hola hna_no

Prueba este ejemplo:
Código PHP:
<html>
<
head>
<
script type="text/javascript">
function 
mostrar(num) {
  
document.forms[0]['maximo'].style.display = (num==0) ? '' 'none'
  
document.forms[0]['cantidad'].style.display = (num==1) ? '' 'none'
  
document.forms[0]['articulos'].style.display = (num==1) ? '' 'none'
}
</script>
</head>
<body>
<form>
<select onchange = "mostrar(this.selectedIndex)">
<option>Unidades</option>
<option>Lotes</option>
</select>
<input type="text" name="maximo" />
<input type="text" name="cantidad" style = "display:none" />
<input type="text" name="articulos" style = "display:none" />
</form>
</body>
</html> 
Saludos,