August 1999
Intermediate to advanced
1488 pages
72h 53m
English
document.referrer
The referrer property contains the URL of the document that was used to reach the current document. If the URL was typed directly into the browser's location field, this property will be empty.
In Listing 7.158, the referrer property is used to create a link back to the previous document from within the current document in the example.
<script language="JavaScript">
<!-- Hide
//Create a link back to the referring document.
document.write("<a href='",document.referrer,"'>Go back</a>");
//Hide End --->
</script>
|
Read now
Unlock full access