首页 > 代码库 > location.href的几种用法

location.href的几种用法

self.location.href;

window.location.href;

this.location.href;

location.href;

parent.location.href;

top.location.href


window.location.href与location.href,self.location.href,location.href都是本页面跳转

"parent.location.href是上一层页面跳转"

"top.location.href是最外层的页面跳转"

location.href的几种用法