欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Javascript刷新頁面的實(shí)例

 更新時(shí)間:2017年09月23日 09:23:08   投稿:lqh  
這篇文章主要介紹了Javascript刷新頁面的實(shí)例的相關(guān)資料,希望通過本文能幫助到大家,需要的朋友可以參考下

腳本之家整理的關(guān)于JS刷新頁面相關(guān)的文章:http://www.dbjr.com.cn/article/139788.htm

Javascript刷新頁面的實(shí)例

Javascript刷新頁面的幾種方法:

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

自動(dòng)刷新頁面的方法:

1.頁面自動(dòng)刷新:把如下代碼加入<head>區(qū)域中

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

其中20指每隔20秒刷新一次頁面.

2.頁面自動(dòng)跳轉(zhuǎn):把如下代碼加入<head>區(qū)域中

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

其中20指隔20秒后跳轉(zhuǎn)到http://www.wyxg.com頁面

3.頁面自動(dòng)刷新js版

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

如有疑問請留言或者到本站社區(qū)交流討論,感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!

相關(guān)文章

最新評論