Ver Mensaje Individual
  #3 (permalink)  
Antiguo 14/09/2006, 12:16
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 23 años
Puntos: 772
Hola x_women

Tu segundo código me ha dado una idea, a ver si te sirve:
Código PHP:
<html>
<
head>
<
script>
function 
VerificarNumero(e){
tecla = (document.all) ? e.keyCode e.which;
if (
tecla==8) return true;
num parseInt(document.forms[0]['vf_opcionmultiple'].value)-1;
patron = new RegExp('[0-' num +']');
te String.fromCharCode(tecla);
return 
patron.test(te);
}
</script>
</head>
<body>
<form>
<input name="vf_opcionmultiple" type="text" value="5" size="5" maxlength="5" readonly="readonly" />
<input name="vf_cantidad" type="text" size="5" maxlength="5" onKeyPress="return VerificarNumero(event)" />
</form>
</body>
</html> 
Saludos,