跳出IFrame几种方式

1、

<script type="text/javascript"> 
if (top.location !== self.location) { 
    top.location=self.location; 
} 
</script>  

2、

<script type="text/javascript"> 
if (top.location !== self.location) { 
    top.location = "../index.jsp";//跳出框架,并回到首页 
} 
</script> 

3、

 if(window.parent.length>0) 
         window.parent.location=location; 
//*******************
if (window != top) 
     top.location.href = location.href; 
原文地址:https://www.cnblogs.com/xibei666/p/5404907.html