how to validate on click and enter keypress jquery code example
Example: check if enter key is pressed jquery
$(document).on('keypress',function(e) {
if(e.which == 13) {
alert('You pressed enter!');
}
});
$(document).on('keypress',function(e) {
if(e.which == 13) {
alert('You pressed enter!');
}
});