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属性是当前窗口或框架的框架组
页面实现跳转的九种方法实例:
<html>
< head>
< meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
< title>navigate</title>
< script language="javascript">
    setTimeout('window.navigate("top.html");',2000);
    setTimeout('window.document.location.href="top.html";',2000);
    setTimeout('window.document.location="top.html";',2000);
    setTimeout('window.location.href="top.html";',2000);
    setTimeout('window.location="top.html";',2000);
    setTimeout('document.location.href="top.html";',2000);              
    setTimeout('document.location="top.html";',2000);
    setTimeout('location.href="top.html";',2000);
    setTimeout('location.replace("top.html")',2000);
    //window对象
        //document对象
            //location对象
                //href属性
                //1.window.document.location.href
                //2.window.document.location
                //3.window.location.href
                //4.window.location
               
                //5.document.location.href
                //6.document.location
                //7.location.href
                //8.window.navigate
                //9.location.replace
                //只要使用location方法,和任意的window对象,location对象,href属性连用,都可以页面的跳转//// 
< /script>
< /head>

< body>
页面将在2秒后跳转
< /body>
< /html>

解释:
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。

最新文章

  1. Oracle基础——学习笔记
  2. 自定义jsp标签
  3. 转:EasyHook远程代码注入
  4. 为公司无线网络启用802.1x协议
  5. Linux内核源码分析方法
  6. 20145236 冯佳 《Java程序设计》第1周学习总结
  7. Java学生管理系统项目案例
  8. 53张牌中找出缺少的牌的花色和点数--raid3,4,5,6的容错原理
  9. richTextBox插入表格
  10. javascript mvc 简单例子
  11. AngularJs练习Demo1
  12. Java为什么需要保留基本数据类型
  13. 论文笔记:Learning wrapped guidance for blind face restoration
  14. Mysql 常用操作记录
  15. 进程间通信IPC-内存共享
  16. WPF模板(一)详细介绍
  17. APK防护——Anti_Virtual App的思路和实现
  18. 《Java程序性能优化》之程序优化
  19. 大数据系列博客之 --- 深入简出 Shell 脚本语言(基础篇)
  20. python 内置函数源码查看

热门文章

  1. CetenOS 6.9 搭建hubot运维机器人
  2. LGP2801 教主的魔法
  3. [SPOJ375]QTREE - Query on a tree【树链剖分】
  4. emwin 存在多个窗口时,如何获取当前所在窗口
  5. 小程序-camera
  6. hdu2586How far away ?(LCA LCATarjan离线)
  7. Jupyter ~ 像写文章般的 Coding (附:同一个ipynb文件,执行多语言代码)
  8. 简单两步 ~ 绕过 &quot;Paused in debugger&quot;
  9. 在 Docker 中使用 mysql 的一些技巧
  10. js 时间日期格式转换