我有两个网页一个
<html>
<body>
<p><a href="page2.html">Link</a></p>
</body>
</html>第二页。
<html>
<body>
<script type="text/javascript">
document.write(document.referrer);
</script>
</body>
</html>第二页总是空白的,似乎没有找到推荐人,你知道为什么吗?
发布于 2010-11-10 22:36:00
在IE中,document.referrer仅适用于http://资源,而不适用于https://和file://资源。也许这就是你的问题。
编辑:有一些even more cases是IE不会传递的。
发布于 2012-02-07 19:31:08
实际上,您使用的document.referrer将返回除Internet Explorer以外的所有浏览器的请求页面URL。它实际上在IE中返回null。
https://stackoverflow.com/questions/4145534
复制相似问题