Javascript for validating numbers in textbox Dating chatting with housewife

1) Validate textbox with decimal values using javascript.

2)After decimal point,it should take only two should not take more than two digits.

Somebody asked me this today on a support call so I did a few quick lookups online and found the solutions listed rather unsatisfying.

Email validation checks the following points Figure 2: Above two figures are example of valid and invalid emails.

This is validation to check that entered values are all letters or combination of different chars.

This tutorial shows both validation and accepting only numbers in a textbox.

This example also shows inline Java Script function call with the input textbox. The javascript function checks for charcode when a key is pressed in the keyboard and it check if it does not fall between 48 and 57 then it is other than digit. We call the javascript function onkeypress javascript event.