Try below :
$(document).ready(function () {
$('#TextBoxID').keypress(function (event) {
var keycode = (event.keyCode ? event.keyCode : event.which);
var TextValue = document.getElementById("TextBoxID").value;
var firstFourLetter = TextValue.substring(1,4);
var lastFourLetter = TextValue.substring(5,10);
if (firstFourLetter.keycode >= '65' && lastFourLetter.keycode <= '90') {
return true;
}
return false;
});
});