Prova questo :

codice HTML:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
No numeri :
<input type="text" id='t' />

<script>
document.getElementById('t').onkeypress = function(event) 
{ 
 var valore = event.char; 
 if ( valore.match(/^([0-9])$/) == null)  
 {   
  return true; 
 } 
 else 
 {  
  return false; 
 } 
}
</script>
</body>
</html>