使用JavaScript和C#中获得referer
内容摘要
1. JavaScript
http://localhost:1897/News/Press/Content.aspx/123?id=1#toc
http://localhost:1897/News/Press/Content.aspx/123?id=1
Request.Url.Scheme http
http://localhost:1897/News/Press/Content.aspx/123?id=1#toc
http://localhost:1897/News/Press/Content.aspx/123?id=1
Request.Url.Scheme http
文章正文
1. JavaScript
http://localhost:1897/News/Press/Content.aspx/123?id=1#toc
http://localhost:1897/News/Press/Content.aspx/123?id=1
Request.Url.Scheme http
Request.Url.Host localhost
Request.Url.Port 1897
Request.Url.Authority localhost:1897
Request.Url.LocalPath /News/Press/Content.aspx/123
Request.PathInfo /123
Request.Url.PathAndQuery /News/Press/Content.aspx/123?id=1
Request.Url.Query ?id=1
Request.Url.Fragment
Request.Url.Segments /
News/
Press/
Content.aspx/
123
Request.Url.Scheme http
Request.Url.Host localhost
Request.Url.Port 1897
Request.Url.Authority localhost:1897
Request.Url.LocalPath /News/Press/Content.aspx/123
Request.PathInfo /123
Request.Url.PathAndQuery /News/Press/Content.aspx/123?id=1
Request.Url.Query ?id=1
Request.Url.Fragment
Request.Url.Segments /
News/
Press/
Content.aspx/
123
4. JavaScript window.location对象
http://www.phpstudy.net/article/57407.htm
怎么样,是不是已经学会了在javascript和C#中获取页面的referer了呢?如有什么疑问,也可以联系我
代码注释