accept only numbers in textbox

<input type="text" onkeypress="return isNumberKey(event)" placeholder="Phone Number">
//this will accept only numbers from 0 to 9
<script>
function isNumberKey(evt)
{
	var charCode = (evt.which) ? evt.which : event.keyCode
	if (charCode > 31 && (charCode < 48 || charCode > 57))
	return false;

	return true;
}
</script>

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
input to only accept numbers allow only numbers input html make field only accept numbers TextInput allow only numbers html textbox only accept numbers html allow only numbers in input input allow only numbers html i input allow only numbers html text field input only allow numbers how to allow numbers only in textbox in html only allow numbers in a textbox how to make text field to accept only numbers on mobile textbox only allow numbers how to make input accept only numbers in javascript accept only numbers in textbox angular 8 input type text accept only number accept only number in input html allow numbers only in textbox html how to make input field accept only numbers uniyu input accept only number in html input accepts numbers only html only allow numbers in textbox input type text accept only numbers in angular input type text accept only numbers in html html allow only numbers in textbox input accept only numbers html input accept only numbers html css3 input that accepts only numbers how to allow only numbers in input field in html5 windows forms make textbox accept only numbers input text allow only numbers accept only numbers or text input field to accept only numbers input field allow only numbers how to make a input field only accept numbers make text area only accept numbers Input type=text to accept only numbers input field only allow numbers allow only numbers on text box only allow numbers in input html make text type only accept numbers html make text type only accept numbers just accept text and numbers in input field make input only accept numbers html textbox allow numbers only accept numbers only in textbox html how to set text field accept only numbers how to make an input field accept only numbers input for to allow only numbers input accepts only numbers input type text should allow only numbers how to make only numbers print in html input text allow how to make a text field accept only numbers in html make input only accept numbers javascript html input only accept numbers input only allow numbers allow only text in input field and not numbers text box allow only numbers in html text box to allow only numbers numbers only textbox how to make text field accept only numbers in html input field accept only numbers input type text but allow only numbers javascript text field accept only numbers allow only number in textbox html only allow numbers input input field accepts only numbers input type text allow only numbers html attribute input field should accept only numbers how to set text field accept only numbers in html how to make input accept only numbers html not accept only the numbers in textbox allow only numbers in textbox html tag input text accept only letters and numbers only allow numbers in text input how to allow only numbers in input field make html input not accept only numbers html input text only accept number html input text but only accept number input that accept number only form make field only accept number allow only numbers input field input field accept only numbers in html text input only allow numbers text input allow only numbers text field accept only numbers how to only allow numbers in a textbox html allow only numbers in textbox javascript accept only numbers in input type text input to accept only numbers allow only numbers in textinput html text filed to accept only number html text filed to accept only number input text accept only numbers textbox accept only numbers in windows application javascript code to accept only numbers and text in textbox input box allow only numbers how to make input:text accept only numbers how to make a textbox only accept digits accept only number input html html text field allow only numbers customize input text to accept only numbers allow input to take only numbers javascript accept only numbers input textbox that only accepts numbers html field from accept only numbers how to allow only numbers in textbox input tag input type should accept only numbers how to allow only numbers in input field in html input type text but only for numbers allow numbers only in textbox only numbers allow in input text field html only accept numbers how to allow only numbers in input type text accept only numbers in textbox html make input field only accept numbers html input accept only numbers textbox allow only numbers only numbers allowed in textbox form input only accept numbers input only accept numbers restrict input to accept only numbers Allow only numbers in textbox HTML5 allow only numbers in textbox html javascript textbox accept only numbers how to make textbox only accept numbers input accept only number html input allow only numbers only allow numbers in input how to allow only numbers in textbox in html input type text allow only numbers input accept only numbers how to make input only accept numbers accept only numbers in input text box accept only numbers in angular textbox should accept only numbers in angular 8 allow only numbers in textbox html only accept numbers in input html55 allow numbers only in text field input type text only allow numbers html text field only accept numbers textbox allow only numbers html input type text accept only numbers how to make an input only accept numbers in html html input allow only numbers allow only numbers in textbox input field only accept numbers allow only numbers in input field html input field that accepts numbers only type should accept only numbers how to require only numbers in a text field make input only accept numbers input field should take only mnumver how to make html input accept numbers only how to make a textbox accept only numbers in html html textbox accept only numbers 0 to 1 How to make HTML input tag only accept numerical values on condition make input box numbers only html input accepts only type integer html input form only number how to check only number in jquery jquery only numbers input field take only numbers jquery validate input text numbers only allow one numbers in html input field only number jquery textbox allow only numbers 1 to 100 in javascript allow only numeric value in textbox using jquery accept only numbers in textbox
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source