Possible Duplicate:
Which is the proper way of filtering numeric values for a text field?
I have a text field in which only numbers are to be allowed. I used regex /^[0-9]/ , its blocking most of the characters. But not option +e , option +n etc.
Using Macosx 10.7.3
Tried blocking alt key altogether on keydown & keyup of Text Field, but no luck
function block(evt) {
if(evt.altKey==true)
return false;
return true;
}
Please suggest.