如何让html页面每隔30s自动刷新呢?
喜欢这个问题 | 分享 | 新建回答
妹岛
两种方式,方式一,利用JavaScript进行自动刷新,如下所示:
<script> setTimeout( function(){ window.location.href=window.location.href; }, 30*1000); </script>
方式二,在html页面的head部分添加meta信息告诉浏览器每隔30s自动刷新:
<meta http-equiv="refresh" content="30">