Ramundo,
<INPUT type="text" id = "up" >
<script>
function filter_input(e, regexp) {
// alert (e);
e= e || window.event;
var target=e.target || e.srcElement;
var code = e.charCode || e.keyCode;
if (code<32 || e.ctrlKey || e.altKey) return;
var text=String.fromCharCode(code);
if (!regexp.test(text))
{
if (e.preventDefault) e.preventDefault();
if (e.returnValue) e.returnValue = false;
return false;
};
return true;
}
document.getElementById("up").addEventListener("keypress", function(event){return filter_input(event, /\d/)}, false);
</script>