Home >Web Front-end >JS Tutorial >Break restrictions on copying and right-clicking on some websites_Hacker nature

Break restrictions on copying and right-clicking on some websites_Hacker nature

WBOY
WBOYOriginal
2016-05-16 19:24:431178browse

If you are developing a website and you like the content but cannot copy it, you can try the following method:

Paste the following text in the address bar and press Enter. After clicking OK on the pop-up warning, you can do whatever you like.

Cancel selection restrictions:

Copy code The code is as follows:
javascript:alert(document .onselectstart=null);

Cancel mouse press restriction:
Copy code The code is as follows:
javascript:alert(document.onmousedown=null);

Cancel mouse button pop-up restriction:
Copy code The code is as follows:
javascript:alert(document.onmouseup=null);
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn