html页面自动刷新的几种实现

  1. 页面自动刷新
<!--每隔20秒刷新一次页面.-->
<head>
	<meta http-equiv="refresh" content="20">
</head>
  1. 页面自动跳转:
<!--隔20秒后跳转-->
<meta http-equiv="refresh" content="20;url=https://www.jb51.net">
  1. js控制页面刷新:
<script>
    /* 每10秒刷新一次*/
    setTimeout(function () {
        location.reload()
    },10000)
</script>

原文链接:
https://www.jb51.net/web/22990.html

猜你喜欢

转载自blog.csdn.net/username666/article/details/106300860