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

OnKeyDown - Enter

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