コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
4405 ビュー

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

アバター
破棄
関連投稿 返信 ビュー 活動
0
1月 21
44
2
12月 23
12757
3
7月 22
23143
2
6月 21
18575
0
9月 20
3727