Answers for "input on enter press"

2

javascript detect enter press on input

var el = document.getElementById("myInputID");
el.addEventListener("keydown", function(event) {
    if (event.key === "Enter") {
        // Enter key was hit
    }
});
Posted by: Guest on January-06-2020
1

on enter press button

<input onkeyup="if(event.keyCode===13){submit.click()}"><button id="submit">submit</button>
Posted by: Guest on September-24-2021
-1

input keyboard enter type

<input enterkeyhint="search">
Posted by: Guest on April-20-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language