self.location.href="url"; //1.仅在本页面打开url window.location.href="url"; //2.当前页面打开URL页面 this.location.href="url"; //3.用法和self.location.href一直 location.href="url"; //4.当前页面打开URL页面 parent.location.href="url"; //5.在父窗口打开此url窗口 top.location.href="url";//6.在顶层页面打开url(跳出框架)
原文 https://www.cnblogs.com/shuilangyizu/p/6604646.html