Posted By

arcturus on 10/28/07


javascript check numeric

Versions (?)

Who likes this?

2 people have marked this snippet as a favorite


Check if a value is numeric or not

 / Published in: JavaScript

With decimal separator "."

  1. function checkNumeric(value){
  2. var anum=/(^\d+$)|(^\d+\.\d+$)/
  3. if (anum.test(value))
  4. return true;
  5. return false;
  6. }

Report this snippet  

You need to login to post a comment.