Asp:
Request.ServerVariables("HTTP_REFERER") 获取上一页URL
获取当前页地址:
代码 sub procUpdateReportUrl(objConn) Dim urlStr if Request.ServerVariables( " SERVER_PORT " ) <> " 443 " then urlStr = " http:// " else urlStr = " https:// " end if urlStr = urlStr & Request.ServerVariables( " SERVER_NAME " ) & Request.ServerVariables( " URL " ) if Request.ServerVariables( " QUERY_STRING " ) <> "" then urlStr = urlStr & " ? " & Request.ServerVariables( " QUERY_STRING " ) end if end sub
asp.net:
HttpContext.Current.Request.Url.PathAndQuery 获取当前页URLPage.Request.UrlReferrer.ToString() 获取前一页URL
javascript:
document.referrer 获取上一页的URLdocument.URL 获取当前页的URL(注:URL必须大写)
转载于:https://www.cnblogs.com/lfzwenzhu/archive/2010/02/22/1671297.html
相关资源:数据结构—成绩单生成器