在中添加如下:
<meta HTTP-EQUIV="REFRESH" CONTENT="1">
其中CONTENT对应刷新的间隔时间,这里为1秒。
完整示例(test.html):
<!DOCTYPE html><html><head> ???<meta HTTP-EQUIV="REFRESH" CONTENT="1"> ???<title>zifeiy‘s auto refresh test</title></head><body> ???<span id="showtime"></span></body><script language="javascript">document.getElementById("showtime").innerHTML = "" + new Date();</script></html>
html页面设置自动刷新
原文地址:https://www.cnblogs.com/zifeiy/p/8971012.html