[Solved] Running a function when enter is pressed in a text box [closed] September 7, 2022 by Kirat keyup() is your answer: $('#word').keyup(function(e) { if(e.which == 13) { // Do your stuff } }); e.which returns the scan/character code of the pressed key. 13 is for ENTER. You can find other codes here. 1 solved Running a function when enter is pressed in a text box [closed]