How to realize that text boxes can only enter numbers in html
Editor to share with you how to achieve html text box can only enter numbers, I hope you have something to gain after reading this article, let's discuss it together!
1. Write onkeypress= "if (event.keyCode) directly in the text field.
< 45 || event.keyCode >57) event.returnValue = false; "
2. Write another function
Var str= "0123456789"; function press () {var str1=document.all.fundsname.value; for (int iTuno; I)