title: How to get copy-paste value before that event change text field value in javascript
body: <p><strong>I have questions regarding java scripts.</strong></p>
  
  <p>Following is steps to reproduce it :</p>
  
  <ol>
  <li>Text field having value 200.</li>
  <li>Copy value from notepad (For ex : 500)</li>
  <li>Select text field cursor at position second (i.e 2|00)</li>
  <li>Paste copied values (500) on that cursor position.</li>
  <li>it display values 250000 (It merge like[- is for just separator] 2-500-00).</li>
  </ol>
  
  <p>But I want 500 only on that text field.</p>
  
  <p>Can anybody suggest me how can I do it in JavaScript.</p>
  
  <p>following is code snapes :</p>
  
  <pre><code>JSP code : onkeyup="javascript:formatCells(this.value)"
  JS code : 
  
  function formatCells(xls){
              var arrGroup = xls.split("\t");
                      alert(arrGroup);    
    }
  </code></pre>