日期:2014-05-17  浏览次数:20847 次

tonbeforepaste是什么意思
tonbeforepaste= "clipboardData.setData( 'text ',clipboardData.getData 'text ').replace(/[^\d]/g, ' ')) "
请问这段代码是什么意思?

------解决方案--------------------
onbeforepaste而不是tonbeforepaste

onbeforepaste是发生在用户粘贴操作之前
clipboardData是DHTML对象
setData以指定格式clipboardData 对象赋予数据

tonbeforepaste= "clipboardData.setData( 'text ',clipboardData.getData 'text ').replace(/[^\d]/g, ' ')) "的意思就是在发生用户粘贴操作之前,将text中的内容进行过滤