how to handle enter press in input code example
Example 1: javascript detect enter press on input
var el = document.getElementById("myInputID");
el.addEventListener("keyup", function(event) {
if (event.key === "Enter") {
// Enter key was hit
}
});
Example 2: input keyboard enter type
<input enterkeyhint="search">