js常用刷新页面的操作

一、手动刷新

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

posted @ 2017-08-25 10:56  豆浆油条123  阅读(709)  评论(0)    收藏  举报