window.location.reload();页面实现跳转和刷新

原文链接


1 history.Go(0)

2 location.reload()
3 location=location
4 location.assign(location)
5 document.execCommand('Refresh')
6 window.navigate(location)
7 location.replace(location)
8 document.URL=location.href
这几个都可以刷新
window.location.reload();刷新
window.location.href=window.location.href;刷新
window.close();关闭窗口,不弹出系统提示,直接关闭  
window.close()相当于self属性是当前窗口
window.parent.close()是parent属性是当前窗口或框架的框架组
页面实现跳转的九种方法实例:



navigate




页面将在2秒后跳转



解释:
location是个对象,比如本页的document.location和window.location的属性有    
  location.hostname   =   community.csdn .NET  
  location.href   =   http://community.csdn .Net /Expert/topic/4033/4033372.xml?temp=2.695864E-02 
  location.host   =   community.csdn.net 
  location.hash   =   
  location.port   =   
  location.pathname   =   /Expert/topic/4033/4033372.xml 
  location.search   =   ?temp=2.695864E-02 
  location.protocol   =   http: 
  可见href是location的属性,类别是string。

你可能感兴趣的:(jquery)