skrypt Java, jak nie pozwolić na Soace

 $(function() {
        $('#input1').on('keypress', function(e) {
            if (e.which == 32){
                console.log('Space Detected');
                return false;
            }
        });
});
Thoughtful Trout