1. Disable right-click menu
Copy codeThe Code is as follows:
<Script type = "text/javascrpt" language = "javascript">
// Method 1
Function noMenuOne ()
{
Alert ('prohibit right-click menu! ');
Return false;
}
Document. oncontextmenu = noMenuOne;
// Method 2
Function noMenuTwo ()
{
If (event. button = 2)
{
Alert ('prohibit right-click menu! ');
Return false;
}
}
Document. onmousedown = noMenuTwo;
</Script>
2. Prohibit replication (Ctrl + C)
Copy codeThe Code is as follows:
<Script type = "text/javascript" language = "javascript">
Function noCopy ()
{
Alert ("do not use Ctrl + C to copy! ");
Event. returnValue = false;
}
</Script>
// <Body oncopy = "noCopy ()">
3. Save as prohibited
Add code between <body> </body>
<Noscript> <iframe src = '*. htm'> </iframe> </noscript>
4. Disable caching
Disable the use of HTML tags in pages for caching, as shown below:
Copy codeThe Code is as follows:
<HEAD>
<META http-equiv = Pragma content = no-cache>
<META http-equiv = Cache-Control content = no-cache>
<META http-equiv = Expires content = 0>
</HEAD>