JavaScript implementation prevents Web pages from being embedded into the Frame code sharing _ javascript skills

Source: Internet
Author: User
This article mainly introduces JavaScript code sharing to prevent web pages from being embedded into the Frame framework. This article provides two anti-embedding methods. For more information, see the following, another kind of rogue behavior has become popular in China: Using Frame to embed your webpage into its webpage.
For example, a website claims to be a "word-of-mouth aggregation portal" to provide the best content of various online forums across the country. However, in fact, it is to use a framework to capture others' Web pages and add its own advertisements and site labels on the pages. what is the difference between this and the copybook piracy ?!

Protection method, in

The code is as follows:



Add this code before:


The code is as follows:


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.