日期:2014-05-17  浏览次数:20620 次

怎样阻止嵌入iframe里的页面自动跳出来
我用iframe调用了一个5d6d论坛的爱墙,过去挺好的,但现在其自动跳转到爱墙,
也就是说我的iframe所在的网页看不了,打开它就直接跳转到了爱墙!调用代码如下:

<iframe   style="margin:-365px 0px 0px -48px" src="http://gin14.5d6d.com/lovewall.php"  frameborder="0" height="1150" width="670" scrolling="yes"></iframe> 


论坛里可以嵌入代码的,该怎么做?

------解决方案--------------------
因为里面写入了防嵌入代码
if(top.location!=self.location)
    top.location = self.location
很难搞  
------解决方案--------------------
把你IE的安全级调一下,让IFRAME里内容不执行JS。
------解决方案--------------------
前面加这段代码 就OK 了
<script> 
var location= "" 
</script> 

------解决方案--------------------
等高人指点