Home>Article>Web Front-end> How to prevent copying of text in Javascript
HTML content:
禁止选中文字和禁止右键菜单
JS code:
Although the above code cannot be selected by right-clicking and the menu will appear, it can still be selected by using the shortcut keyctrl
c
Copy, so you can modify it as follows:
Recommended: "2021 js interview questions and answers (large summary)"
The above is the detailed content of How to prevent copying of text in Javascript. For more information, please follow other related articles on the PHP Chinese website!