title: JavaScript keycode allow number and plus symbol only
body: <p>I have this JavaScript function that is used to force user only type number in the textbox. Right now and I want to modify this function so it will allow the user to enter plus (+) symbol. How to achieve this?</p>
  
  <pre><code>//To only enable digit in the user input
  
  function isNumberKey(evt)
  {
      var charCode = (evt.which) ? evt.which : event.keyCode
      if (charCode &gt; 31 &amp;&amp; (charCode &lt; 48 || charCode &gt; 57))
          return false;
      return true;
  }
  </code></pre>