Techno WeBlog

blogging about tech, the tech, and everything tech, for techno addicts!

Join Techno Google group

Number Validation Using JavaScript

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 visit

posted by Jansan John @ 12:16 AM,
Labels : DiggIt!  |


Post a Comment

Links to this post:

Create a Link

<< Home



Previous Posts