How do I trigger an HTML button when the “Enter” key is pressed in a textbox?

$(document).ready(function(){
    $('#TextBoxId').keypress(function(e){
      if(e.keyCode==13)
      $('#linkadd').click();
    });
});

Leave a Comment