Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

addeventlistener keydown

document.querySelector('#txtSearch')
.addEventListener('keypress', function (e) {
    if (e.key === 'Enter') {
      // code for enter
    }
});
 
PREVIOUS NEXT
Tagged: #addeventlistener #keydown
ADD COMMENT
Topic
Name
5+2 =