Decimal validation in JavaScript -


i use following script decimal validate.i need enter numbers , dot symbol 123.00 only.the following function not support letters fine.but not allow enter dot(.) symbol also?how enter dot symbol using function?

function isnumberkey(evt)       {          var charcode = (evt.which) ? evt.which : event.keycode          if (charcode > 31 && (charcode < 48 || charcode > 57))             return false;          else          return true;       } 

function isnumberkey(evt)        {           var charcode = (evt.which) ? evt.which : event.keycode           if (charcode != 46 && charcode > 31              && (charcode < 48 || charcode > 57))              return false;            return true;        } 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c++ - Using OpenSSL in a multi-threaded application -

All overlapping substrings matching a java regex -