是通过<a href="">打开的,并把它放到web服务器下

解决方案 »

  1.   

    我是通过<a href="">打开的,但不是放到服务器下。放在客户端运行不行么???
      

  2.   

    This property returns a value only when the user reaches the current page through a link from the previous page. Otherwise, document.referrer returns an empty string; it also returns an empty string when the link is from a secure site.For example, if PageA.htm includes a link to PageB.htm, and the user clicks that link, the document.referrer on PageB.htm returns "PageA.htm". However, if the user is on PageA.htm and types PageB.htm into the address line or uses Open in the File menu to get to PageB.htm, the document.referrer returns an empty string.
      

  3.   

    不过你上面的没说为什么要放到web服务器。
    能解释一下为什么要放到web服务器吗?答案最好用中文吧,我的英语水平不是很好。谢谢。
      

  4.   

    document.referrer 这句代码取不到值, 所以才会出错, 解决的办法是:window.history.back()
      

  5.   

    我知道history可以实现该功能,不过我现在理解不了那个document.referrer,你能解释一下吗?麻烦你啦!!!!谢谢
      

  6.   

    document.referrer 是判断上一页的来源·!!!!!!!!!!!!!!!