Document referrer
<html> <body> <script language="JavaScript"> function function1() { var m = document.referrer; alert(m); } </script> <input type="button" value="Get referrer" onclick="function1();"> </body> </html>