window.location.reload();页面实现跳转和刷新
来源:互联网 发布:网上商城源码javaweb 编辑:程序博客网 时间:2024/06/05 17:49
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。
- window.location.reload();页面实现跳转和刷新
- window.location.reload();页面实现跳转和刷新
- window.location.reload();页面实现跳转和刷新
- window.location.reload();页面实现跳转和刷新
- window.location.reload();页面实现跳转和刷新
- window.location.reload();页面实现跳转和刷新
- window.location.href/replace/reload()--页面跳转+替换+刷新
- window.location.href/replace/reload()--页面跳转+替换+刷新
- window.location.href/replace/reload()--页面跳转+替换+刷新
- window.location.href/replace/reload()--页面跳转+替换+刷新
- window.location.href/replace/reload()--页面跳转+替换+刷新
- window.location.href/replace/reload()--页面跳转+替换+刷新
- window.location.href/replace/reload()--页面跳转+替换+刷新
- window.location.href/replace/reload()--页面跳转+替换+刷新
- window.location.href/replace/reload()--页面跳转+替换+刷新
- window.location.href/replace/reload()--页面跳转+替换+刷新
- window.location.href/replace/reload()--页面跳转+替换+刷新
- window.location.href/replace/reload()--页面跳转+替换+刷新 区别
- Big Gun上手评测:不太严肃的黑帮游戏
- db2 v9.5下载连接地址
- .cd文件解释
- 袁岳(今日小诗:立场)
- 攻击方式学习之(1) - 跨站式脚本(Cross-Site Scripting)
- window.location.reload();页面实现跳转和刷新
- Oracle请求HTTP用例
- 攻击方式学习之(2) - SQL注入(SQL Injection)
- NSString详细介绍
- 用 doxygen 生成源码文档
- 开启“掌”控IT新时代——CIO搞定年终总结,就这么简单!
- ubuntu11.10输入法推荐-ibus-sunpinyin
- 电视平台下的四向键交互原则
- Designing Data Storage Architecture-SQL Azure differences