以前被面试官考到的一个问题:如何禁止用户复制html页面的某些文字。
现在通过加css类名来实现效果,具体代码如下:
.not-copy {
-ms-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
以前被面试官考到的一个问题:如何禁止用户复制html页面的某些文字。
现在通过加css类名来实现效果,具体代码如下:
.not-copy {
-ms-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}