Others prevent their web page is embedded in another page using iframe manner ----- if (self! = Top)

IF (Self = Top!) {
       top.location self.location =;
   }
// means are not allowed to be present on the page frame. The purpose is to prevent your web page referenced in someone else's page!

 

Upstairs was right, top point to the topmost window object framework, self pointing to the window object of the current frame. If the page does not iframe, the top and self is the same value, so the code can be prevented by others own web pages embedded in other way to the iframe.

Guess you like

Origin www.cnblogs.com/wen-/p/12446877.html