Teach you to disable right-click and also teach you how to hack

Source: Internet
Author: User

Many people will encounter this situation, when browsing the page, found that the right mouse button is not enabled. Hey? Refresh and refresh, and no eggs, and then hit the mouse (yes, I was so violent), change the browser, useless, and finally abandoned. In fact, this is because the designer has enabled the "Disable Right button" feature on the page in order to prevent the content from being copied.

I was once a victim, and now as a small IT Developer, I'm going to tell you how to "Disable Right button"!

Here is a case that I encountered when I developed a report using Finereport.

Enable "Disable Right button"

Report everyone understand, enable the "Disable right button" function, often for the display process of data security and operational errors to consider ( think of the bank at every turn thousands of millions of of the amount, minutes to a long mind ah ).

First call the template in the page, usually put the url in the iframe , and then click the appropriate tree node to view the report, the general report will set permissions, if you set permissions, After logging on to the system, some users may view the URL by clicking on the property in the right-click and then access it, which is not safe for the system, so the user is prevented from right -click to view the URL. You can now use the Disable menu right-click Feature.

2. implementation Steps

Click Templates > templates Web properties >(fill out, data analysis, page preview settings), select separate settings for the template, In the following event settings, add a Load end event, the complete JS code is as follows:

1.//Right click No action document.oncontextmenu=new Function ("return false"), 2.//right-click Popup prompt Document.oncontextmenu=function (e) {   Alert ("Hint content"); return false;}

The basic principle of this code is to let the user's right-click event return false, prohibit pop-up menu.
If you have a parameter panel in your template and you want to disable right-click on a call to a template instead of after a query, you need to add an initialization event to the query button in the parameters panel to write the above JS code.

650) this.width=650; "src=" http://img.blog.csdn.net/20160706093437176 "style=" border:none; "/>

650) this.width=650; "src=" http://img.blog.csdn.net/20160706093501893 "style=" border:none; "/>

Prompt and disable before querying

650) this.width=650; "src=" http://img.blog.csdn.net/20160706093521706 "style=" Border:none;color:rgb (54,46,43); Font-family:arial;font-size:14px;line-height:26px;white-space:normal;background-color:rgb (255,255,255); "/>

Cracked "Disable right button"

Find the "Tools" button in the top menu of the browser, and in the drop-down menu, select "Internet Options"

650) this.width=650; "src=" http://img.blog.csdn.net/20160706093542316 "style=" Border:none;color:rgb (54,46,43); Font-family:arial;font-size:14px;line-height:26px;white-space:normal;background-color:rgb (255,255,255); "/>

After you turn on Internet options, switch to the Security tab, and then tap Custom Level at the bottom

650) this.width=650; "src=" http://img.blog.csdn.net/20160706093613426 "style=" Border:none;color:rgb (54,46,43); Font-family:arial;font-size:14px;line-height:26px;white-space:normal;background-color:rgb (255,255,255); "/>

Then, in the security settings -internet Area dialog box that opens, locate the Active Scripting Settings option, change the default enable to Disabled, and then click OK at the bottom.

650) this.width=650; "src=" http://img.blog.csdn.net/20160706093637146 "style=" border:none; "/>

Then close and restart the browser, and then open the Web page, you will find that the "disabled" right mouse button can be normal click.

The above is my method, the shortcomings are also please more guidance.


This article is from the "male Bully the World's Blog" blog, reproduced please contact the author!

Teach you to disable right-click and also teach you how to hack

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.