HTML方式

1、页面刷新

<!-- 5秒之后,跳转到http://www.qunar.com页面 -->
<meta http-equiv="refresh" content="5" />

2、页面跳转

<!-- 5秒之后,跳转到http://www.qunar.com -->
<meta http-equiv="refresh" content="5; url=http://www.qunar.com" />
<!-- 点击qunar跳转到http://www.qunar.com -->
<a href="http://www.qunar.com">qunar</a>

JS方式

1、页面刷新:

history.go(0)

location.reload()

location.href = location.href

location.assign(location)   //加载页面本身为新文档

document.execCommand('Refresh')

window.navigate(location)   //只适用于IE浏览器,建议不要使用这个方法

location.replace(location)  

2、页面跳转

//当前页跳转到通过URL方式跳转到当前页面的最后一个页面
//如果跳转到的页面需要加载的文件在缓存中的话,使用缓存中的文件,不在缓存中的话请求新文件
history.back() //当前页跳转到通过URL方式跳转到其他页面的最后一个页面
//如果跳转到的页面需要加载的文件在缓存中的话,使用缓存中的文件,不在缓存中的话请求新文件
history.forward() //设置n值的大小,实现跳转,与history.back()、history.forward()原理类似
history.go(n) location.href = url location.assign(url) //加载页面本身为新文档 window.navigate(url) //只适用于IE浏览器,建议不要使用这个方法 location.replace(url)

HTML页面刷新、跳转的更多相关文章

  1. js页面刷新跳转的几种方式及区别

    跳转常用方法: window.location.href="index.php"; window.history.back(-1);//类似于按钮,参数是负几,就后退几次. win ...

  2. JS定时刷新页面及跳转页面

    JS定时刷新页面及跳转页面 Javascript 返回上一页1. Javascript 返回上一页 history.go(-1), 返回两个页面: history.go(-2); 2. history ...

  3. showModalDialog 刷新问题,在页面中跳转问题

    showModalDialog 刷新问题 ,在页面中跳转问题 <html><head>    <base target="_self" >< ...

  4. js中页面刷新和页面跳转的方法总结

    .js中cookie的基本用法简介 2009-12-15 js中页面刷新和页面跳转的方法总结 文章分类:Web前端 关键字: javascript js中页面刷新和页面跳转的方法总结 1.histor ...

  5. js刷新页面和跳转

    javascript返回上一页: 1.返回上一页 history.go(-1); 返回上两个页面 history.go(-2); <a href="javascript:history ...

  6. js中页面刷新和页面跳转的方法总结 [ 转自欢醉同学 ]

    .js中cookie的基本用法简介 2009-12-15 js中页面刷新和页面跳转的方法总结 文章分类:Web前端 关键字: javascript js中页面刷新和页面跳转的方法总结 1.histor ...

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

    1 history.go(0)2 location.reload()3 location=location4 location.assign(location)5 document.execComma ...

  8. 黄聪:Pjax无刷新跳转页面实现,支持超链接与表单提交

    什么是pjax? 当你点击一个站内的链接的时候,不是做页面跳转,而是只是站内页面刷新.这样的用户体验,比起整个页面都闪一下来说, 好很多. 其中有一个很重要的组成部分, 这些网站的ajax刷新是支持浏 ...

  9. js在一定时间内跳转页面及各种页面刷新

    1.js 代码: <SCRIPT LANGUAGE="JavaScript"> var time = 5; //时间,秒 var timelong = 0; funct ...

随机推荐

  1. maven仓库私服配置

    私服访问地址:[[http://192.168.1.252:9080/nexus/content/groups/public/ 地址]] 1. 打开eclipse/myeclipse的maven插件: ...

  2. eclipse编译异常修正:the project cannot be built until its prerequisite...

    close错误的project,重新open , 再 clean下 .

  3. 树莓派学Python博客收集

    http://www.geekfan.net/8657/  这个博客是控制LED,虽然不是原创地址不是这,但是我觉得排版比较好. http://my.oschina.net/RagingTyphoon ...

  4. physical addressing virtual addressing 物理寻址 虚拟寻址

    Computer Systems A Programmer's Perspective Second Edition The main memory of a computer system is o ...

  5. hardware control language

    Computer Systems A Programmer's Perspective Second Edition We then provide some background on digita ...

  6. P1018 乘积最大

    开始定义状态f[i][j][k]为[i,j)区间插入k个括号,使用记忆化搜索,但是成功爆栈,得到4个mle #include <bits/stdc++.h> using namespace ...

  7. jsonObject jsonarray

    1.JAR包简介 要使程序可以运行必须引入JSON-lib包,JSON-lib包同时依赖于以下的JAR包: commons-lang.jar commons-beanutils.jar commons ...

  8. epoll 实际使用

    void DataHandle::recv() {     sleep(2);     _data_router -> readInfoHw(&mInfo);     ALOGD(SYS ...

  9. [qemu] 在前端驱动使用virtio的情况下,如何让后端使用vhost-user [未解决]

    首先,如果你更关心原理和知识,请读读这个 http://chuansong.me/n/2186528 (值得细细的逐字读). 在<<深入浅出dpdk>>中提到,vhost-us ...

  10. BLE 4.0 与 4.1的区别

    蓝牙技术让我们在连接各种设备的时候不再被繁多的数据线所束缚,比如音响.电脑,甚至是汽车.目前最新的蓝牙版本是4.0,相比3.0它进一步降低了功耗,并且也提高了传输效率.近日,蓝牙技术联盟(Blueto ...