How can I disable Paste (Ctrl+V) option using jQuery in one of my input text fields?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- How to fix IE ClearType + jQuery opacity problem i
- void before promise syntax
- jQuery add and remove delay
As of JQuery 1.7 you might want to use the on method instead
You can catch key event :
Not tested but, could help.
Source from comentcamarche and Zakaria
I tried this in my Angular project and it worked fine without jQuery.
And in script part:
In non angular project, use 'onPaste' instead of 'ng-paste' and 'event' instesd of '$event'.