I have a form that only takes in numbers as it represents a dollar amount. Currently, the form only accepts numerical keystrokes. Is this good practise?
Yes, I would say that you should only accept characters appropriate to the field. If it's a phone number, you should also accept characters like: ()-+.
However, you should let the person know that an invalid key was pressed rather than do nothing. Otherwise you may end up frustrating them. Examples include: a small error message that pops up next to the field and then fades out; or simply changing the border colour to red before fading it back again.
Client-side validation can be helpful, but you need to be very careful how you implement it; it's easy to make it unhelpful to the user.
For example, if you silently ignore non-numeric characters, then a user quickly typing '12.34' might not realise that the field has ignored their decimal point and accepted the text as '1234'.
Another example; if you silently ignore non-numeric characters, then a user typing in a negative number '-56' will find it converted into a positive number '56'.
Now, it may well be invalid for the system to accept fractional numbers or negative numbers; but you need to think how to best help the user when they enter these. Are they deliberately trying to enter a value they believe to be valid? Are they accidentally typing a value which they know to be invalid? Does your validation routine help the user realise and correct their mistake?
Short answer: Yes, I believe this is indeed good practice. Mind that the decimal sign (possibly depending on localization settings) or a negative sign might also be regarded as correct input.
Also check out this article: http://msdn.microsoft.com/en-us/library/windows/apps/aa511451.aspx#passwordsAndPINs especially the part about "Incorrect character".
Like @Bart, I thought to the decimal separator : “,” or “.”
It may be a good idea to accept the signs “+” and “−”, and “-” of course [“−” is a “minus” sign, and “-” is a hyphen].
The same goes for the space, and some of its variants : non-breaking space, thin space… When I want to transfer 1 million dollars, I type “1 000 000”.