我在一个文本框中,使用这个事件...可是当我复制一个要过滤的字符串的时候...其它文本框也不能粘贴了.这是怎么回事.
粘贴一个正确的字符串是可以在其它文本框中复制的..

解决方案 »

  1.   

    onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d|-]/g,''))"就是这个啊..
      

  2.   

    <input type="text" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/a/g,''))">
    <input type="text" >我这可以,输入 a123 ,看看
      

  3.   

    Replaces the current document by loading another document at the specified URL. 
    replace()这不对吧
      

  4.   

    <input type="text" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/a/g,''))">
    <input type="text" >aaaaaaa1231321复制5个a,粘贴到下面那个文本框,显示5个a
      

  5.   

    Replaces   the   current   document   by   loading   another   document   at   the   specified   URL.   
    replace()这不对吧什么意思???
      

  6.   

    你这是没问题的 因为你输入5个a的时候是被你把事件过滤成空的了 所以在往下复制是都是空的
    就像你77777aaaa的时候往下复制还是77777一个道理啊!