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

页面自动刷新,加到head区

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

页面自动跳转,加到head区


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

页面自动刷新


<script language="JavaScript">
function myrefresh()
{
window.location.reload();
}
setTimeout('myrefresh()',1000); //指定1秒刷新一次
</script>

posted @ 2015-01-21 14:59  小胖是猪  阅读(91)  评论(0)    收藏  举报