Blocking accent characters
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/10866444/which-is-the-proper-way-of-filtering-numeric-values-for-a-text-field">Which is the proper way of filtering numeric values for a text field?</a>  </p>
</blockquote>



<p>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.</p>

<p>Using Macosx 10.7.3</p>

<p>Tried blocking alt key altogether on keydown &amp; keyup of Text Field, but no luck</p>

<pre><code>function block(evt) {
if(evt.altKey==true)
return false;
return true;
}
</code></pre>

<p>Please suggest.</p>
