Thursday, February 27, 2014

Preventing form submission when Enter is pressed

$('input').keydown(function(event){
            if(event.keyCode == 13) {
                event.preventDefault();
                return false;
            }
});

No comments:

Post a Comment