Prevent user from copying text on mobile browsers

前端 未结 11 2135
陌清茗
陌清茗 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 02:10

    You can try using :after tag and styling it with content: "Text"; in css, AFAIK you cannot select :before and :after's content.

提交回复
热议问题