Hello, I'm new to the javascript field and I'm having a question, how can I get the value of the keys and lock strings, special characters, and accepts only NUMBERS in my field.
My Code Down
<input type="text" id="numero" placeholder="377273288328">
<script>
let numero = document.getElementById("numero");
numero.addEventListener("keypress", e=>{
if(e.keyCode>=48 && e.keyCode<=57){
// o codigo do 0 ao 9
}else{
//como eu bloqueio?
}
})
</script>