title: How do I check if the key pressed on a form field is a digit (0 - 9)?
body: <p>I'm using the <code>onkeyup</code> event on a form field in JavaScript, and I'm wanting to check if the key the key pressed is a numeric digit - i.e. 0 - 9, so I can then do something with the input.</p>
  <pre><code>&lt;input type=&quot;text&quot; onkeyup=&quot;&quot; /&gt;
  </code></pre>
  <p>Would I need to use Regex for this?</p>