Home > Web Front-end > JS Tutorial > body text

javascript prohibits copying web pages_javascript tips

WBOY
Release: 2016-05-16 18:51:41
Original
1312 people have browsed it
1. Disable right-click and copy
Method 1:
Add the following code to the web page:

Method 2:
Add the following code in
:

or

Essentially, method 2 is the same as method 1. Method 3:
If you only limit copying, you can add the following code in
:

2. Make the menu "file" "-"Save as" invalid
If you just disable right-clicking and selecting copy, others can also copy the file through "File" - "Save as" in the browser menu. In order to invalidate the copy, you can add the following code between and
:
In this way, the user saves the web page When the time comes, the error "Unable to save the web page" will appear.
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template