HTML DOM referrer property
Definition and Usage
referrer property returns into the current document source document's URL.
If the current document is not accessible by hyperlinks, was null. This property allows the client JavaScript to access HTTP referrer header.
grammar
document.referrer
Browser Support
All major browsers support referrer property
Examples
Examples
Returns the current document Source URL:
<html>
<body>
本文档的引用地址:
<script>
document.write(document.referrer);
</script>
</body>
</html>
<body>
本文档的引用地址:
<script>
document.write(document.referrer);
</script>
</body>
</html>
try it"
Document Object