方法一:html
<title>xxxxx</title>之後加入下面這一行即可!<meta http-equiv="refresh" content="10">
10代表刷新間隔,單位爲秒,實現每隔10秒對本頁面進行一次刷新
若是要定時跳轉到其他頁面,可以用
<meta http-equiv="refresh"content="10;url=跳轉的頁面">
方法二:javascript
使用
<script language="javascript">
setTimeout("self.location.reload();",1000);
<script>
實現本頁面自動刷新,每秒一次
若是要跳轉到其他頁面,則可以使用
<script>setTimeout("location.href='url'",1000)</script>
其中url是要刷新的頁面URL地址,等待時間爲1秒