Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent copying text in web-page

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

like image 979
Anton Avatar asked Jan 21 '12 22:01

Anton


People also ask

How do I stop people from copying text from a website?

If, for some reason, you would like to prevent users from copying and pasting text from your web pages through Ctrl-C Ctrl-V, or using the mouse, jQuery can help. $('body'). bind('copy paste cut drag drop', function (e) { e.

How do I restrict copy and paste in HTML?

You can use jquery for this: $('body'). bind('copy paste',function(e) { e. preventDefault(); return false; });

How do you make a text unable to copy?

You can allow text selection, but prevent copy and cut functions using the oncopy, oncut and onpaste event attributes. By adding these attributes into a textbox's <input> tag, you can disable cut, copy and paste features.

What is the HTML code for prevent copying text from Web page?

-webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; Disallow them from being able to answer when the window's onBlur event is fired.


1 Answers

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; 

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.

like image 103
mowwwalker Avatar answered Sep 30 '22 23:09

mowwwalker