Paste event in Javascript

后端 未结 4 1088
礼貌的吻别
礼貌的吻别 2020-12-28 14:44

How can I handle the paste selected through right click in javascript? I tried with \"onpaste\" event and all other html events available but nothing works.

4条回答
  •  感动是毒
    2020-12-28 15:27

    Nice pure JS solution (as requested...) is available on the Mozilla dev site

    
    
    
    onpaste event example
    
    
    
    

    Play with this editor!

    Log

提交回复
热议问题