Number Validation Using JavaScript
Sunday, June 24, 2007
Usig javascript, the simplest way to check whether the details entered in a text field are numeric is to to loop through the string and compare each character to a pre-defined list of acceptable characters.
we can also achive tthis functionality by using the regular expressions.in this case also, we have allowed decimal points and numbers zero through 9. using the ‘match’ function we can search the string for the regular expression pattern provided. if any mismatch occured in the patters the “match” function will return a null value.
for more details and functions please visithttp://blog.codlib.com/2007/06/22/number-validation-using-javascript/
Labels : DiggIt! |
Del.icio.us