JS重新整理頁面的幾種方法(轉)

來源:互聯網
上載者:User

標籤:

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.

9 查詢頁面可以用js控制提交查詢按鈕,觸發查詢事件實現頁面自重新整理功能。

____________________________________________

架構頁中:(架構頁中其中一個子頁)

top.location.reload();   重新整理整頁 
self.location.reload();  重新整理本頁

window.parent.location.href=‘‘ 架構頁重新導向

_____________________________________________

自動重新整理頁面的方法:1.頁面自動重新整理:把如下代碼加入<head>地區中<meta http-equiv="refresh" content="20">其中20指每隔20秒重新整理一次頁面.<body onload="opener.location.reload()"> 開窗時重新整理<body onUnload="opener.location.reload()"> 關閉時重新整理。

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

if (infoAction_Sort.Insert(info_Sort))
                {
                    ScriptManager.RegisterStartupScript(this.UpdatePanel, this.GetType(), "alert", "alert(‘相簿分類添加成功‘);window.location.reload();", true);
                  
                    //Alert("相簿分類建立成功");
                    //Response.Redirect(Request.Url.ToString());//重新整理本頁
                    this.txt_AddSort.Text = "";
                    this.txt_SortDepict.Text = "";
                }

文章引自:http://www.cnblogs.com/kingjiong/archive/2009/11/20/1607081.html

JS重新整理頁面的幾種方法(轉)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.