title: Javascript allow only numeric paste
body: <p><strong>Javascript/jQuery:</strong></p>
  
  <pre><code> $(document).ready(function () {
       $('#txt').bind("paste", function (e) {
           var $this = $(this);
           $this.val($this.val().replace(/[^\d.]/g, ''));
       });
   });
  </code></pre>
  
  <p><strong>Html:</strong></p>
  
  <pre><code>&lt;asp:TextBox ID="txt" runat="server"&gt;&lt;/asp:TextBox&gt;
  </code></pre>
  
  <p>If value as below</p>
  
  <pre><code>10-10-20.0a
  </code></pre>
  
  <p><strong>Result</strong> must be as below</p>
  
  <pre><code>1010200
  </code></pre>
  
  <p>I only want to allow it to paste numeric values to the textbox, otherwise, disable it. However, if I try the above javascript code, it is not working.</p>
  
  <p>Where did I miss on the javascript side?</p>