JavaScript document.referrer [英] JavaScript document.referrer
本文介绍了JavaScript document.referrer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有两个网页一个
<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>
第二页总是空白,它似乎没有拿起推荐人,任何想法为什么?
The second page is always blank, it doesn't seem to be picking up the referrer, any idea's why?
推荐答案
在IE中, document.referrer
仅适用于 http://
资源,而非 https://
和 file://
那些。也许这就是你的问题。
In IE, document.referrer
works only for http://
resources, not https://
and file://
ones. Maybe that is your problem.
编辑:有更多案例,其中IE没有传递它。
There are even more cases in which IE doesn't pass it on.
这篇关于JavaScript document.referrer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文