title: Do not allow decimal and alphabet values in textbox
body: <p>I want to restict decimal and alphabatic values in textbox. I just want to enter only numbers in textbox. And do not copy and paste th text and decimal value also. Want t enter only numbers(0 o 9). How can I do this using regex of javascript o jquery.</p>
  
  <p><a href="http://jsfiddle.net/44pc78pj/175/" rel="nofollow">fiddle</a></p>
  
  <p>See this fiddle, here everything is working. But arrow keys are not working. I can't able to move left and right, and if I give (shift+home) or (shift + end) its not selecting the value. Please help me for</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> 
  
   $(".allownumericwithoutdecimal").on("keypress keyup blur",function (event) {    
             $(this).val($(this).val().replace(/[^\d].+/, ""));
              if ((event.which &lt; 48 || event.which &gt; 57)) {
                  event.preventDefault();
              }
          });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code> 
      
   &lt;span&gt;Int&lt;/span&gt;
  &lt;input type="text" name="numeric" class='allownumericwithoutdecimal'&gt;
  &lt;div&gt;Numeric values only allowed  (Without Decimal Point) &lt;/div&gt;  </code></pre>
  </div>
  </div>
  </p>
  
  <p>do this.</p>