if you mean referrer, try (note, under some cases, you will see an empty string):document.referrer

解决方案 »

  1.   

    window.open()
    window.location="xxx.htm"
    过去的将得不到
      

  2.   

    你可以利用 history.go(-1) 或 history.back() 回到过去的 URL,却无法在到达前知道这个 URL
      

  3.   

    1.document.referrer需要走http协议2.
    <script>
    window.open()
    window.location="about:<input type=button value=父窗口url onclick=alert(opener.location)>"
    </script>
      

  4.   

    referrer 只适用于当前页面来自于前一页面的链接的情况例如a.htm 上有一链接 <a href=b.htm>
    点击进入 b.htm,b.htm 的 referrer 内容为 "a.htm"但如果用户是通过其它途径进入 b.htm(地址栏键入地址、收藏夹等),referrer 是空
      

  5.   

    没看懂 qiushuiwuhen(秋水无恨) 的代码
    能否解释一下?
      

  6.   

    location.href="javascript:history.back()";
      

  7.   

    判断上一页的来源
    asp:
    <%=request.servervariables("HTTP_REFERER")%>
    javascript:
    alert(document.referrer);
      

  8.   

    好像只能返回地址栏中的地址,如果我用的是框架,在地址栏中不能显示相应联接的地址,那么通过document.referrer方法就不灵了,如何解决上述问题,谢谢!