首页 > Web开发 > 详细

js常用刷新页面的操作

时间:2017-08-25 12:09:20      阅读:261      评论:0      收藏:0      [点我收藏+]

一、手动刷新

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

二、自动刷新

<meta http-equiv="refresh" content="20">

每20秒刷新一次

三、页面自动跳转

<meta http-equiv="refresh" content="20;url=http://www.baidu.net">

20秒后,在跳转值www.baidu.com

js常用刷新页面的操作

原文:http://www.cnblogs.com/songdongdong/p/7426964.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!