Created
April 28, 2020 22:45
-
-
Save parzibyte/e4f2313b3f0e348560bc096a365fca4a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const $elementos = document.querySelectorAll(".prevenir-envio"); | |
$elementos.forEach(elemento => { | |
elemento.addEventListener("keydown", (evento) => { | |
if (evento.key == "Enter") { | |
// Prevenir | |
evento.preventDefault(); | |
return false; | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment