»
EnglishFrenchVietnamese

Print - Obtaining the URL of the Referring Document - JavaScriptBank.com

Full version: jsB@nk » Snippet » Obtaining the URL of the Referring Document
URL: https://www.javascriptbank.com/obtaining-the-url-of-the-referring-document.html

Obtaining the URL of the Referring Document © JavaScriptBank.comUse this JavaScript snippet to obtain the URL which referred the user to that page. Be aware that on some servers this may not work.

Full version: jsB@nk » Snippet » Obtaining the URL of the Referring Document
URL: https://www.javascriptbank.com/obtaining-the-url-of-the-referring-document.html



JavaScript
<script type="text/javascript"><!--// Created by: Chris Stimpert :: http://ilovethecode.com/function refer() {  if (!document.referrer) {    document.write("No referrer, pal.")  }  else {    document.write(document.referrer);  }}//--></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<script type="text/javascript">  refer();</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->