1. Disable other webpages and add the following code to the webpage <body> </body>.
Program code
<Noscript> <iframe src = *. html> </iframe> </noscript>
2. Disable caching in front-end HTML
Program code
<Meta http-equiv = "pragma" content = "no-cache"/>
3. Do not cut or screenshot (ie is valid, the principle is to clear the clipboard), you can prohibit simple screenshots.
Program code
<Script language = "javascript">
<! --
Function testclip (){
Try {
If (clipboardData. getData ("Text") | clipboardData. getData ("HTML") |
ClipboardData. getData ("URL "))
{
Null;
}
}
Catch (e ){
ClipboardData. setData ("Text ","")
}
SetTimeout ("testclip ()", 500)
}
Testclip ();
// -->
</Script>
4. Right-click the block, Ctrl + n, shift + F10, F5 refresh, and backspace.
Program code
<Script>
Function KeyDown (){
// Alert ("ASCII Code:" + event. keyCode );
If (window. event. altKey )&&
(Window. event. keyCode = 37) | // mask Alt + direction key seek
(Window. event. keyCode = 39) {// mask Alt + direction key →
Alert ("You are not allowed to use ALT + arrow keys to move forward or backward the webpage! ");
Event. returnValue = false;
}
If (event. keyCode = 8) | // shield the unregeed deletion key
(Event. keyCode = 116) | // block the F5 refresh key
(Event. keyCode = 112) | // http://bizhi.knowsky.com/block the F1 refresh key
(Event. ctrlKey & event. keyCode = 82) {// Ctrl + R
Event. keyCode = 0;
Event. returnValue = false;
}
If (event. ctrlKey) & (event. keyCode = 78) // block Ctrl + n
Event. returnValue = false;
If (event. shiftKey) & (event. keyCode = 121) // block shift + F10
Event. returnValue = false;
If (window. event. srcElement. tagName = "A" & window. event. shiftKey)
Window. event. returnValue = false; // block shift with the left mouse button to open a new page
If (window. event. altKey) & (window. event. keyCode = 115) {// block Alt + F4
Window. showModelessDialog ("about: blank", "", "dialogWidth: 1px; dialogheight: 1px ");
Return false ;}
}
Function Showhelp (){
Alert ("Haha ");
Return false;
}
</Script>
5. Move the mouse in the browser to the toolbar that jumps out of the image
Program code
Or
Program code
<Meta http-equiv = "imagetoolbar" content = "no">
</Head>
6. Hide and select the text on the page to shield the right-click menu (IE)
Program code
<Script language = "javascript" type = "text/javascript">
Document. oncontextmenu = new Function ("event. returnValue = false ;");
Document. onselectstart = new Function ("event. returnValue = false ;");
</Script>
7. Select, paste, copy, cut, and right-click menus are blocked.
Program code
<Body id = "body" onselectstart = "return false" onpaste = "return false" oncopy = "return false;" oncut = "return false;" oncontextmenu = "return false; ">
8. Disable printing and saving
Disable printing (printed blank)
<Style>
@ Media print {
BODY {display: none}
}
</Style>
Deselected
<Body>
<Body topmargin = "0" leftmargin = "0" onmouseup = "document. selection. empty ()">
Do not save webpages
<Noscript>
<Iframe> </iframe>
</Noscript>
Regular cleanup of clipboard can be used to prevent copying (this is too disgusting. Do not copy or paste anything when you open this webpage)
SetInterval ("window. clipboardData. setData ('text', 'close the Branch website ')", 100)
Removes clipboard when the page gets focus and loses focus. It can also be used to prevent replication.
<Body>
9. Disable the buttons for saving, printing, sending emails, and adding images to favorites.
When you place the cursor over an image, the SAVE, print, mail, and favorite buttons appear. If you want to disable it.
Insert the code into the webpage.
Disable small image menus
<META HTTP-EQUIV = "imagetoolbar" CONTENT = "no">
You can add the galleryimg attribute when inserting an image.
Disable saving webpages as code
Today, online plagiarism is getting worse and worse, and your webpage work is often "borrowed" by others ". In fact, you don't have to worry about this. You only need to add a few pieces of code to the webpage or use special encryption tools to encrypt the source code, images, and text of the webpage, in this way, the rest of your web page will be suspended!
Clever Use of code
Adding a few lines of simple code to an HTML webpage can prevent others from using the right-clicking and "Save as" commands.
I. Right-click the screen
Modify the webpage tag to the following code:
<Body oncontextmenu = self. event. returnValue = false onselectstart = "return false">
Right-click the button to avoid any response.
2. Disable the "Save as" command
Add the following code between the <body>... </body> label to make the "Save as" command not run smoothly.
<Noscript>
<Iframe scr = "*. htm"> </iframe>
</Noscript>
After the preceding code is added, when the "Save as" command is executed, the "error occurred while saving the webpage" dialog box is displayed.
Use Html Guard
The above method can only protect the security of web pages to a certain extent. If you want to completely prevent plagiarism by others, you can use both the Code and software methods at the same time. The following describes how to use Html Guard to encrypt webpages.
Html Guard File
Latest Version: 2.3
Software size: 1054KB
Software type: Shared Software
Applicable systems: Win9X/Me/2000/NT/XP
: Http://www.skycn.com/soft/6588.html
Start the software after installation. Its operation interface consists of five function labels and setting areas (figure 1 ).
1. Select a webpage File
Click the "Input" tab in the main interface. The "Protect all files in a directory" option is selected to encrypt the webpage files in the entire folder. If files in subfolders also need to be encrypted, select the "Include sub directories" option. To encrypt a single webpage, select "Protect following HTML files" and use the "Add" button to Add the webpage.
Ii. Set output
Use the "Browse" button next to "Copy to following directory" under the "Output" label to set the location of the encrypted file. Usually we need to select the "Copy Linked Files" item, so that the link Files related to the webpage will be copied to the output directory together. "Overwrite existing files" indicates that the source file is overwritten with the encrypted file. We recommend that you do not use this item.
If you do not want to view the output result, you can use the "Upload to server via FTP" item to directly Upload the encrypted file to the server. Click "FTP-Settings". In the displayed dialog box, set the server address, user name, and user password.
Select "Create Backup copies of the unmodified files before overwriting html pages" under "backup", which means to Create a Backup before the encrypted information is written to the webpage. To create a backup in the original folder, select "Place in the original directory.
3. Encryption source code
On the "Source code" Page (Figure 2), there are three methods to encrypt Source code.
1. Encode source code (compile source code ). When this option is used, garbled characters are displayed when someone opens the webpage in the webpage editor. Because the compilation is based on the JavaScript technology, the compiled webpage must run on a browser that supports JavaScript 1.0 or more. If you are worried that someone cannot view your webpage, you can select the "Include <noscript> section" item and add a prompt in the column below it. For example, to view the webpage normally, you must have a browser that supports JavaScript 1.0 or above.
2. Squeeze source code (compressed source code ). This item is mainly used to remove empty lines in the Code and make the code more compact. In addition to making it difficult for the hacker to understand the source code, this can also reduce the volume of web files and effectively reduce the transfer time.
3. Insert blank lines (Insert blank rows ). The purpose of inserting empty rows is to make it difficult to find the source code. Select "At the beginning (At the front end)" or "At the end (At the end)" to determine the position of adding blank rows, then adjust the value of "Number of lines" to determine the Number of empty rows to be inserted. In addition, you can use the Insert the following text at the top item to add warning information such as "source code not available (this webpage code is unavailable)" at the top of the webpage code. Note that each inserted blank line will increase the size of the webpage file by two bytes.
Iv. Image and text Protection
The options in the "Images/Texts" tab have the following functions: "Lock the menu on the right mouse button" helps you Lock the webpage's right-click menu; "Block text selection" prohibits text selection (this function can only take effect in browsers over IE4.0); "Do not display links in status bar" does not display links in the status bar; "Deactivate browser's print function" disables the printing function of the browser; "Disable Clipboard" disables the Clipboard function; "Disable image caching in browser" disables the image cache of the browser.
5. view results
Click the "Protect files" button on the right of the page to encrypt the webpage files (if a warning window pops up, click "Continue" to Continue working ). Click the page to be viewed in the "Result" tab, and select "Load in browser" in the expanded items to view the encrypted effect. Of course, you can also use the "Path" and "Show source code" commands in the expanded item to open the folder where the encrypted file is stored and view the encrypted source code (3 ).
I believe that you have basically mastered how to use the software. Hurry up with our rights protection weapons to protect our legitimate interests from infringement.