js控制页面跳转

1.location.href

  • self.location.href:
  • window.location.href='url':重定向页面并刷新,而window.open('url')只表示打开页面,并不刷新
  • this.location.href:
  • location.href:以上四种都为本页面跳转
  • parent.location.href:上一层页面跳转(iframe)
  • top.location.href:最外层页面跳转(iframe)

 

2.window.history.go(number):

3.window.navigate(url):重新加载页面为url

posted @ 2015-10-27 21:56  人云慧  Views(286)  Comments(0)    收藏  举报