How to detect Ctrl+V, Ctrl+C using JavaScript?

前端 未结 17 1926
走了就别回头了
走了就别回头了 2020-11-22 13:47

How to detect ctrl+v, ctrl+c using Javascript?

I need to restrict pasting in my textareas, end user should not copy and p

17条回答
  •  失恋的感觉
    2020-11-22 14:43

    I wrote a jQuery plugin, which catches keystrokes. It can be used to enable multiple language script input in html forms without the OS (except the fonts). Its about 300 lines of code, maybe you like to take a look:

    • http://miku.github.com/jquery-retype

    Generally, be careful with such kind of alterations. I wrote the plugin for a client because other solutions weren't available.

提交回复
热议问题