Disable Save page Disable right-click to prevent page text from being selected and copied

Source: Internet
Author: User
Tags password protection

Http://home.51.com/lontenda/diary/item/10011460.html



Prohibit save page
1. Prohibit Save As
<nos cript><iframe Src=-.html></iframe></nos cript>
Join the head.

2. Prohibit right-click
<body oncontextmenu= "return false" >
Or
<s cript language= "Javas cript" >
<!--

if (window. Event)
Document.captureevents (Event.mouseup);

function Nocontextmenu ()
{
Event.cancelbubble = True
Event.returnvalue = false;

return false;
}

function Norightclick (e)
{
if (window. Event)
{
if (E.which = = 2 | | e.which = = 3)
return false;
}
Else
if (Event.button = = 2 | | event.button = = 3)
{
Event.cancelbubble = True
Event.returnvalue = false;
return false;
}

}

Document.oncontextmenu = Nocontextmenu; For ie5+
Document.onmousedown = Norightclick; For all others
-
&LT;/S cript>

3. Let the page text not be selected and copied
<body onselectstart= "return false" >
Or
<body Oncopy=alert (' Sorry, no copying. ');event.returnvalue=false;>

4. Lock status bar text to prevent the address from appearing
<body onmouseover= "self.status= ' text '; return true" >


7. Prohibit image download
At the end of <body......> here add:
Oncontextmenu= "return false" ondragstart= "return false" onselectstart= "return false" scroll= "Auto"

5. Disable caching
<meta http-equiv= "Expires" content= "0" >
<meta http-equiv= "Cache-control" content= "No-cache" >
<meta http-equiv= "Pragma" content= "No-cache" >
Put it in the head.

6. Use the Include Page
Encrypt the included page address, using the tool htmlguardian5.3.5
Currently the most powerful HTML code encryption software, can protect the connection and the HTML code is stolen. 1. Right-click the lock. 2. Disable Mouse circle. 3. Offline use is not allowed. 4. Password protection. 5. The Status bar URL address is not displayed. 6. Full code or local code protection. 7. Link Tracking. 8. Prohibit printing (ie5+). 9. Compress the code (before it is unencrypted). 10. *.html *.js *.asp *.vbs can be encrypted. 11. Two different encryption algorithms. 12. Encrypt the frameset structure. 13. Some features support several different versions of the browser.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.