Probá así:
  Código PHP:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>Validar entrada de datos</title>
<script type="text/javascript">
/*---- Créditos: javierB - http://www.telefonica.net/web2/blas-mar/validarformu.html ----*/
function validar(e) { 
    tecla = (document.all) ? e.keyCode : e.which; 
    if (tecla==8) return true; 
    patron =/[0-9.s]/; 
    te = String.fromCharCode(tecla);
    return patron.test(te); 
} 
</script>
</head>
 
<body>
<form name="formulario">
  <input type="text" name="nombre" onkeypress="return validar(event)" onpaste="return false;" />
</form>
 
</body>
</html>