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

Glib GIOChannel -

delphi - When I encode/decode SMS PDU (GSM 7 Bit) user data, do I need prepend the UDH first? -

python - Obscure curses error message when creating a sub window -