Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js enter key event listener

document.getElementById("yourElementId").addEventListener("keypress", function (event) {
    if (event.key === "Enter") {
       // the code you want to run
    }
})
Source by www.woodstitch.com #
 
PREVIOUS NEXT
Tagged: #js #enter #key #event #listener
ADD COMMENT
Topic
Name
2+9 =