Get the value of a textbox during cut event

前端 未结 3 1863
我寻月下人不归
我寻月下人不归 2021-01-18 05:33

I have trapped the cut event (jquery) on a textbox. What I want is to get the text on the textbox during the cut event is triggered.

I\'ve tried accessing the data t

3条回答
  •  时光说笑
    2021-01-18 06:10

    I would suggest looking at this, JavaScript get clipboard data on paste event (Cross browser), it is for the paste event but I'm sure you could do something similar and compare the current value to that on the clipboard, if they are exactly the same than the input would be empty, otherwise not.

提交回复
热议问题