1
我有以下情形:怎麼回去使用Javascript前一頁ASP.NET
我在我的網頁下面的腳本:
function GoBackToPreviousPage() {
parent.history.back();
return false;
}
在後面的代碼我有以下內容
If (some conditions are met)
Page.ClientScript.RegisterStartupScript(this.GetType(), "GoBackToPreviousPage", "GoBackToPreviousPage();", true);
如果條件滿足,我希望頁面轉到ba ck到前一頁, 原因我在JavaScript而不是在服務器上做這個 是因爲(parent.history.back();)維護所有以前的頁面的歷史
我注意到執行RegisterStartupScript並執行回發後腳本被執行,但它保持在同一頁上,它不回到上一頁
? – MarcusVinicius 2013-02-21 17:52:48
我有同樣的問題,如果我使用:history.back()沒有家長 – 2013-02-21 17:59:35
那麼'history.go(-1)'呢? – MarcusVinicius 2013-02-21 18:01:20