title: How to restrict characters entered into a textbox using jQuery
body: <p>I have a HTML text box which I'm using for a phone number. I want to restrict users from entering characters into that text box using jQuery. </p>
  
  <p>i tried using something like this</p>
  
  <pre><code>&lt;input type="text"  onkeyup="this.value = this.value.replace(/[^a-z]/, '')" /&gt; 
  </code></pre>
  
  <p>but its allowing characters and restricting numbers </p>
  
  <p>Any ideas highly appreciated.</p>