codice:
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Example</title>
<script type="text/javascript">
function checkInput(oToCheckField, oKeyEvent) {
	return oKeyEvent.charCode === 0 || /[a-zA-Z]/.test(String.fromCharCode(oKeyEvent.charCode));
}
</script>
</head>

<body>
<form name="myForm">


Type here: <input type="text" name="myInput" onkeypress="return(checkInput(this, event));" onpaste="return(false);" /></p>
</form>
</body>
</html>