I have a form with two text boxes, one select drop down and one radio button. When the enter key is pressed, I want
form
Using TypeScript, and avoid multiples calls on the function
let el1= document.getElementById('searchUser'); el1.onkeypress = SearchListEnter; function SearchListEnter(event: KeyboardEvent) { if (event.which !== 13) { return; } // more stuff }