Mega Code Archive

 
Categories / JavaScript Tutorial / Document
 

Document referrer

The referrer property contains the URL 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. <html>     <script language="JavaScript">     <!--     document.write("<a href='",document.referrer,"'>Go back</a>");     -->     </script> </html>