Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
4392 Visualizzazioni

Hi, I have a text field.

my_field = fields.Text()

I want to disable copying and paste(ctrl+c, ctrl+v) from intput with java script or python. How i can do it, thanks.

Avatar
Abbandona
Risposta migliore

Hi Pavel,

This thing you can do with the jquery event handlers cut, copy & paste.

Code: 

    $ (document) .ready (function () {

       $ ('# txtInput'). on ("cut copy paste", function (e) {

          e.preventDefault ();

       });

    });

Thanks ....

For more information Contact us:- https: //kanakinfosystems.com/odoo-development-services

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
gen 21
44
2
dic 23
12740
3
lug 22
23118
2
giu 21
18569
0
set 20
3721