JS--刷新當前頁面

 

 http://blog.csdn.net/xxb2008

//Javascript刷新頁面的幾種方法:
history.go(0) 
location.reload() 
location=location 
location.assign(location) 
document.execCommand('Refresh') 
window.navigate(location) 
location.replace(location) 
document.URL=location.href

//框架刷新

opener.location.reload()   ////子窗口刷新父窗口
window.opener.document.location.reload()

parent.FrameID.location.reload(); //刷新iframe 
window.parent.frames[1].location.reload()//刷新frame 
window.parent.frames.bottom.location.reload() //bottom frame名稱


//自動刷新頁面的方法:
<meta http-equiv="refresh" content="20"> //每隔20秒刷新一次
<meta http-equiv="refresh" content="20;url=http://www.aaa.net"> //指隔20秒後跳轉到http://www.aa.net頁面

http://blog.csdn.net/xxb2008

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章