Last Updated: February 25, 2016
·
2.557K
· ottovanluchene

OnKeyDown - Enter

textboxId.onkeydown = function(e) { 
    if (!e) { 
          var e = window.event; 
    } // Enter is pressed 
    if (e.keyCode == 13) { 
          submitFunction(); 
     } 
}