title: javascript input masking for numeric and english keyboard only
body: <p>I have an input field that has a masking of <code>"999999999"</code>. It works perfectly fine on English keyboard but I am also able to enter Japanese/Chinese characters into it (breaking the masking).</p>
  
  <p>Is there a way to restrict the input to english keyboard numerics only?</p>
  
  <pre><code>&lt;input type="text" id="pin" lang="en"&gt;
  </code></pre>
  
  <p>I also tried the following but it did not work.</p>
  
  <pre><code>$.fn.onlyNumeric = function(config) {
      var defaults = {
      }
      var options = $.extend(defaults, config);
      return this.each(function(){
          $(this).bind('keyup blur', function(){
              $(this).val($(this).val().replace(/[^0-9]/g, ''));
          });
      });
  }
  
  $('#pin').onlyNumeric();
  </code></pre>
  
  <p>Any help?</p>