window.opener.location 

解决方案 »

  1.   

    referer只能获得a标签过来的页面
      

  2.   

    window.opener.location
    or
    window.parent.location
      

  3.   


    得不到啊???代码如下:
    1.html
    <html>
    <head>
    <title>wujinjian</title>
    </head>
    <body>
    <a href="2.html">asdf</a>
    </body>
    </html>
    2.html
    <html>
    <head>
    <title>wujinjian</title>
    <script type="text/javascript">
    alert(document.referrer);   
    </script>
    </head>
    <body>
    sdafasdfsadsafsadassdfsad
    </body>
    </html>
      

  4.   

     HttpContext.Current.Request.UrlReferrer.Host + HttpContext.Current.Request.UrlReferrer.AbsolutePath
                
      

  5.   

    不行啊??代码如下: 
    1.html 
    <html> 
    <head> 
    <title>wujinjian </title> 
    </head> 
    <body> 
    <a href="2.html">asdf </a> 
    </body> 
    </html> =================================2.html 
    <html> 
    <head> 
    <title>wujinjian </title> 
    <script type="text/javascript"> 
    alert(document.referrer);  
    </script> 
    </head> 
    <body> 
    sdafasdfsadsafsadassdfsad 
    </body> 
    </html>
      

  6.   

    parent.location
    冲星了,差19分,呵呵。
      

  7.   

    得不到?那alert的结果是什么?