Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4401 มุมมอง

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.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ม.ค. 21
44
2
ธ.ค. 23
12753
3
ก.ค. 22
23138
2
มิ.ย. 21
18575
0
ก.ย. 20
3726