我写了2个页..1.asp<Script>window.location.href='2.Asp'</Script>2.asp<%
Response.Write(Request.ServerVariables("Http_Referer")) '统计来源地址
%>问题出在 1.ASP 里面. js跳转过去以后记录不知道来源地址. 我测试N个JS跳转代码.都无效. 
比如:
window.open
location.href
top.location.href
window.location.href请问下大家,要怎么跳转2.asp才可以获取到来源地址.. 

解决方案 »

  1.   

    试试采用完整的URL路径HTTP://...
    也试试:
    window.location.assign("http://.../2.asp")//注意位置
      

  2.   

    用form提交,在action里写跳转试试
    没搞过asp,呵呵。
      

  3.   

    window.location.assign('http://192.168.1.2/Index1.Asp')也是无效的..
      

  4.   

    你用 document.referrer 
    js的方法取得父页面的地址试试看。是不是能满足你要的效果
      

  5.   

    你用 document.referrer 
    js的方法取得父页面的地址试试看。是不是能满足你要的效果
      

  6.   


    <script type="text/javascript"
     src="http://slideshow.triptracker.net/slide.js"></script>
    <script type="text/javascript">
    <!--
      var viewer = new PhotoViewer();
      viewer.add(’http://www.blueidea.com/articleimg/2003/12/1441/011.jpg’);
      viewer.add(’http://www.blueidea.com/articleimg/2003/12/1441/021.jpg’);
      viewer.add(’http://www.blueidea.com/articleimg/2003/12/1441/03.jpg’);
      viewer.add(’http://www.blueidea.com/articleimg/2003/12/1441/061.jpg’);
      viewer.add(’http://www.blueidea.com/articleimg/2003/12/1441/051.jpg’);
    //--></script>
    <style type="text/css">
    <!--
    .Slideshow a {
     margin-right: 5px;
     margin-left: 5px;
     text-decoration: none;
    }
    -->
    </style>
    <center>
    <div class="Slideshow">
    <a href="http://www.blueidea.com/articleimg/2003/12/1441/011.jpg" onclick="return viewer.show(0 target=_blank)">
    <img width="70" height="70" src="http://www.blueidea.com/articleimg/2003/12/1441/011.jpg" alt="" /> </a>
    <a href="photo/2.jpg" onclick="return viewer.show(1 target=_blank)">
    <img width="70" height="70" src="http://www.blueidea.com/articleimg/2003/12/1441/021.jpg" alt="" /> </a>
    <a href="photo/3.jpg" onclick="return viewer.show(2 target=_blank)">
    <img width="70" height="70" src="http://www.blueidea.com/articleimg/2003/12/1441/03.jpg" alt="" /> </a>
    <a href="photo/4.jpg" onclick="return viewer.show(3 target=_blank)">
    <img width="70" height="70" src="http://www.blueidea.com/articleimg/2003/12/1441/061.jpg" alt="" /> </a>
    <a href="photo/5.jpg" onclick="return viewer.show(4 target=_blank)">
    <img width="70" height="70" src="http://www.blueidea.com/articleimg/2003/12/1441/051.jpg" alt="" /> </a>
    <br/>
    </div>
    </center>
      

  7.   


    <script type="text/javascript"
     src="http://slideshow.triptracker.net/slide.js"></script>
    <script type="text/javascript">
    <!--
      var viewer = new PhotoViewer();
      viewer.add(’http://www.blueidea.com/articleimg/2003/12/1441/011.jpg’);
      viewer.add(’http://www.blueidea.com/articleimg/2003/12/1441/021.jpg’);
      viewer.add(’http://www.blueidea.com/articleimg/2003/12/1441/03.jpg’);
      viewer.add(’http://www.blueidea.com/articleimg/2003/12/1441/061.jpg’);
      viewer.add(’http://www.blueidea.com/articleimg/2003/12/1441/051.jpg’);
    //--></script>
    <style type="text/css">
    <!--
    .Slideshow a {
     margin-right: 5px;
     margin-left: 5px;
     text-decoration: none;
    }
    -->
    </style>
    <center>
    <div class="Slideshow">
    <a href="http://www.blueidea.com/articleimg/2003/12/1441/011.jpg" onclick="return viewer.show(0 target=_blank)">
    <img width="70" height="70" src="http://www.blueidea.com/articleimg/2003/12/1441/011.jpg" alt="" /> </a>
    <a href="photo/2.jpg" onclick="return viewer.show(1 target=_blank)">
    <img width="70" height="70" src="http://www.blueidea.com/articleimg/2003/12/1441/021.jpg" alt="" /> </a>
    <a href="photo/3.jpg" onclick="return viewer.show(2 target=_blank)">
    <img width="70" height="70" src="http://www.blueidea.com/articleimg/2003/12/1441/03.jpg" alt="" /> </a>
    <a href="photo/4.jpg" onclick="return viewer.show(3 target=_blank)">
    <img width="70" height="70" src="http://www.blueidea.com/articleimg/2003/12/1441/061.jpg" alt="" /> </a>
    <a href="photo/5.jpg" onclick="return viewer.show(4 target=_blank)">
    <img width="70" height="70" src="http://www.blueidea.com/articleimg/2003/12/1441/051.jpg" alt="" /> </a>
    <br/>
    </div>
    </center>
      

  8.   

    <script type="text/javascript"
     src="http://slideshow.triptracker.net/slide.js"></script>
    <script type="text/javascript">
    <!--
      var viewer = new PhotoViewer();
      viewer.add(’http://www.blueidea.com/articleimg/2003/12/1441/011.jpg’);
      viewer.add(’http://www.blueidea.com/articleimg/2003/12/1441/021.jpg’);
      viewer.add(’http://www.blueidea.com/articleimg/2003/12/1441/03.jpg’);
      viewer.add(’http://www.blueidea.com/articleimg/2003/12/1441/061.jpg’);
      viewer.add(’http://www.blueidea.com/articleimg/2003/12/1441/051.jpg’);
    //--></script>
    <style type="text/css">
    <!--
    .Slideshow a {
     margin-right: 5px;
     margin-left: 5px;
     text-decoration: none;
    }
    -->
    </style>
    <center>
    <div class="Slideshow">
    <a href="http://www.blueidea.com/articleimg/2003/12/1441/011.jpg" onclick="return viewer.show(0 target=_blank)">
    <img width="70" height="70" src="http://www.blueidea.com/articleimg/2003/12/1441/011.jpg" alt="" /> </a>
    <a href="photo/2.jpg" onclick="return viewer.show(1 target=_blank)">
    <img width="70" height="70" src="http://www.blueidea.com/articleimg/2003/12/1441/021.jpg" alt="" /> </a>
    <a href="photo/3.jpg" onclick="return viewer.show(2 target=_blank)">
    <img width="70" height="70" src="http://www.blueidea.com/articleimg/2003/12/1441/03.jpg" alt="" /> </a>
    <a href="photo/4.jpg" onclick="return viewer.show(3 target=_blank)">
    <img width="70" height="70" src="http://www.blueidea.com/articleimg/2003/12/1441/061.jpg" alt="" /> </a>
    <a href="photo/5.jpg" onclick="return viewer.show(4 target=_blank)">
    <img width="70" height="70" src="http://www.blueidea.com/articleimg/2003/12/1441/051.jpg" alt="" /> </a>
    <br/>
    </div>
    </center>
      

  9.   

    ieguoling1  你这代码没我的问题,没有关系啊.
      

  10.   

    document.write('<form name=myForm>');
    var myForm=document.forms['myForm'];
    myForm.action='http://192.168.1.2/Index1.Asp';
    myForm.method='POST';myForm.submit();