在做HTML页面的时候,经常会遇到“如果当前页面显示在iframe中,我们就相应的处理”
判断方法为:
//判断是否在iframe中 if(self!=top){ parent.window.location.replace(window.location.href); }
在做HTML页面的时候,经常会遇到“如果当前页面显示在iframe中,我们就相应的处理”
判断方法为:
//判断是否在iframe中 if(self!=top){ parent.window.location.replace(window.location.href); }