一直以来都是这么干的:
if( self != top ) { top.location.href = self.location.href; }
原来还可以这么搞:
if( self != top ) { top.location.replace(self.location.href); }
两者的区别就是,前者会被浏览器的返回按钮按钮记录下来,后者不会留下返回的痕迹。
if( self != top ) { top.location.href = self.location.href; }
原来还可以这么搞:
if( self != top ) { top.location.replace(self.location.href); }
两者的区别就是,前者会被浏览器的返回按钮按钮记录下来,后者不会留下返回的痕迹。