Allow numbers only on " onpaste" and check the what already there in Text Box
<blockquote>
  <p>I have a function for restricting the text to be copied to an numeric
  textbox</p>
  
  <p>onpaste i'm calling a function alloNumbersOnly(this) </p>
  
  <p>but it fails when i copy -1</p>
  
  <p>for example i'll copy -1 and paste it 4 times, textbox situation will
  be -1-1-1-1</p>
</blockquote>

<pre><code>function alloNumbersOnly(obj) 
{
          var txt = window.clipboardData.getData('Text');
          if (isNaN(txt)) {
           return false;
          }
}
</code></pre>

<blockquote>
  <p>how do i solve this..??</p>
</blockquote>
