generate functionSun, 11 Dec 2022

detect enter key in any input that is in focus

$(document).keypress(function(e) { if(e.which == 13) { // do something here } });

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant