Prevent user from copying text on mobile browsers

前端 未结 11 1944
陌清茗
陌清茗 2021-02-20 01:57

I\'m trying to develop a typing speed competition using JavaScript. People should write all the words they see from a div to a textarea.

To prevent cheating (like copyin

11条回答
  •  佛祖请我去吃肉
    2021-02-20 01:58

    pointer-events: none

    CSS pointer-events allows you to control the interaction between an element and the mouse. When set to none, the element is never the target of mouse events.

    MDN definition page

提交回复
热议问题