Only allow input number value with autoNumeric.js - The Koch Family
The Koch Family The Koch Family

Latest news

جاري التحميل ...

Only allow input number value with autoNumeric.js

autoNumeric is a jQuery plugin that automatically formats currency and numbers as you type on form inputs. I used autoNumeric 1.9.21 for demo code.

1. Dowload autoNumeric.js file from
2. Import to project
<script src=""></script>
<script type="text/javascript" src="js/autoNumeric.js"></script>
3. Define a function to use it
<script type="text/javascript">
/* only number is accepted */
function txtNumberOnly_Mask() {
var inputOrgNumber = $("#numberTxt");
inputOrgNumber.each(function() {
aSep : '',
aDec: '.',
vMin : '0.00'

4. Call the function by event

<input type="text" value="" id="numberTxt"/>(only number)


<script type="text/javascript">

$(document).ready(function (){





If you like the content of our blog, we hope to stay in constant communication, just enter your email to subscribe to the blog's express mail to receive new blog updates, and you can send a message by clicking on the button next ...

إتصل بنا

About the site

author The Koch Family <<  Welcome! I'm so glad that you stopped by Your Modern Family blog. Together, we will talk about raising kids, organizing the home and saving money! and Tips & tricks and more…

< Learn more ←

Blog stats

Sparkline 2513183

All Copyrights Reserved

The Koch Family