Que tal amigos!!!
tengo una funcion que consegui googleando para aceptar solo numeros en un input
, funciona bien pero el firebug de firefox me dice "event is not defined"
la funcion es esta
Código Javascript
:
Ver originalfunction s(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}
y lo inicio de asi
onKeyPress="return s(event)"
Saludos y muchas gracias!!!