Thursday 18 August 2016

Remove Non numbers in input values in jquery



Remove Non numbers in input values in jquery

if (/\D/g.test(this.value))
{
   
// Filter non-digits from input value.
   
this.value = this.value.replace(/\D/g, '');
}