首頁  >  文章  >  web前端  >  JS刷新頁面的幾種方法

JS刷新頁面的幾種方法

高洛峰
高洛峰原創
2016-12-17 15:14:322088瀏覽

Javascript刷新頁面的幾種方法:

1 history.go(0)

2 location.reload()

3 location=location

4 location.assign(location)

')

6 window.navigate(location)

7 location.replace(location)

8 document.URL=location.href.

____________________________________________

框架中一個框架中

框架中一個子

top.location.reload();   刷新整頁  

self.location.reload();  刷新本頁

window.parent.location.href='' 框架頁重定向

_________________________________________. :1.頁面自動刷新:將以下程式碼加入區域中其中20指每隔20秒刷新一次頁面. 開窗時重新整理 關閉時重新整理。

例:資料新增成功後彈出對話方塊並重新整理頁面

if (infoAction_Sort.Insert(info_Sort))

              ScriptManager.RegisterStartupScript(this.UpdatePanel, this.GetType(), "alert", "alert('相簿分類新增成功');window.location.reload();", true);

                   

                    //Response.Redirect(Request.Url.ToString()); //刷新本頁
                    this.txt_AddSort.Text = "";
                      }





更多JS刷新頁的中文方法相關文章網!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
上一篇:Json格式解析下一篇:Json格式解析