Posts by Careca Builder • 1 point
1 post
-
-1
votes7
answers44529
viewsA: How to get only the numbers of a string in Javascript?
easiest way I found: function somenteNumeros(num) { var tecla = event.keyCode; return (tecla > 47 && tecla < 58) } <input type="text" onkeypress="return somenteNumeros(this)"/>…