title: jquery - How do I add an alert message to this jquery code base?
body: <h2><strong>The Question</strong></h2>
  
  <p>To help avoid end-user confusion, I want to add an alert message that pops up if/when the user clicks any other key ["alert('Only Numerical data allowed')"].  So if they press the 'k' the above message will pop up.  Can anyone see how to set this code within this code base</p>
  
  <ul>
  <li><strong>jsfiddle</strong>: <a href="http://jsfiddle.net/EN8pT/4/" rel="nofollow">http://jsfiddle.net/EN8pT/4/</a></li>
  </ul>
  
  <hr>
  
  <h2><strong>The Code</strong></h2>
  
  <p><strong>jquery</strong>:</p>
  
  <pre><code>$('input.numberinput').bind('keypress', function (e) {
      var w = e.which;
      return (w != 8 &amp;&amp; w != 0 &amp;&amp; (w &lt; 48 || w &gt; 57) &amp;&amp; w != 46) ? false : true;
  });
  </code></pre>
  
  <p>​</p>
  
  <p><strong>html</strong></p>
  
  <pre><code>&lt;div class="containercontent"&gt;
  
           &lt;div class="label"&gt;Enter a number:&lt;/div&gt;
          &lt;input type="text" name="txtNumber1" id="txtNumber1" value=""  class="numberinput" /&gt;
  
           &lt;div class="label"&gt;Enter a number:&lt;/div&gt;
          &lt;input type="text" name="txtNumber2" id="txtNumber2" value="" class="numberinput" /&gt;
      &lt;/div&gt;
  </code></pre>