Category: JQuery

Trigger an on click event to a HTML button when keyboard enter key press using JQuery

Trigger an on click event to a HTML button when keyboard enter key press using JQuery HTML code part JS code part $( document ).ready(function() { $(“#id_of_textbox”).keyup(function(event){ if(event.keyCode == 13){ $(“#id_of_button”).click(); } }); if you have only one submit button in your page normally modern browsers trigger on click event when pressing the enter key […]