Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript detect enter press on input

var el = document.getElementById("myInputID");
el.addEventListener("keydown", function(event) {
    if (event.key === "Enter") {
        // Enter key was hit
    }
});
Source by www.woodstitch.com #
 
PREVIOUS NEXT
Tagged: #javascript #detect #enter #press #input
ADD COMMENT
Topic
Name
9+3 =