日期:2014-05-18  浏览次数:20353 次

javascript怎样获取window.history中记录的多个URL?
如题

------解决方案--------------------
window.history(-1);
window.history(-2);
window.history(1);
.....
------解决方案--------------------
微软的答复
For security reasons, the history object does not expose the actual URLs in the browser history.

你可以用
document.referrer
取得上一个地址
或者history.go back 之类的
------解决方案--------------------
后台: if (!this.IsPostBack) { ViewState[ "url "] = Request.UrlReferrer.ToString(); }
------解决方案--------------------
视图到js.就很容易了 var url = " <%=ViewState[ "url "].ToString()%> ";