防止在网页中复制文字 [英] Prevent copying text in web-page

查看:119
本文介绍了防止在网页中复制文字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有测验应用程序。机器人在聊天时提出不同的问题,这些问题属于知识的不同领域。先回答问题的用户,获得积分。问题是,有些用户在Google上搜索答案。我希望以某种方式防止用户从网页和搜索结果中回答问题。

I've got quiz application. Where robot ask different questions in chat, this questions belong to different areas of knowledges. User that answered question first, receive points. The problem is, that some users googling answers. I want somehow prevent users from coping question from web page and googling answers.

我甚至不确定这是否可能,无论如何,可能有人有任何想法

I'm not even sure, that this is possible, anyway probably someone got any ideas

推荐答案

禁用文本选择突出显示>如何禁用使用CSS的文本选择突出显示?
$ b

Here: How to disable text selection highlighting using CSS?

-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;

当窗口的onBlur事件被触发时,禁止它们回答。他们仍然可以使用其他设备,但他们无法在同一台计算机上作弊。

Disallow them from being able to answer when the window's onBlur event is fired. They can still use other devices, but they won't be able to cheat on the same computer.

这篇关于防止在网页中复制文字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆