【问题标题】:How to auto clicking a link with referral or auto redirect a link with referral?如何自动单击带有推荐的链接或自动重定向带有推荐的链接?
【发布时间】:2011-12-07 08:20:04
【问题描述】:

如何自动点击带有referrer的链接或自动重定向带有referrer的链接? 正如我所测试的,使用 location.href 和 location.replace 不会将引用者传递到下一页。有什么方法吗?

【问题讨论】:

    标签: javascript html redirect referrer


    【解决方案1】:

    你可以通过这个

          <meta http-equiv="refresh" content="N; URL=other-web-address">
    

    其中 N 是您希望在浏览器自动转到另一个网址之前显示当前网页的大致秒数。如果 N = 0,则浏览器应立即转到另一个网址。

    更多详情请查看here

    或者你也可以使用这个

       <HTML>
       <script>
    
       function autoChange()
       {
       var timeID = setTimeout("location.href= 'http://www.xyz.com'", 1000)
       }
       </script>
      <BODY onLoad="autoChange()">
       Welcome to my website,... unfortunally we moved it to WWW.xyz.COM.<BR>
       Your browser will automatically jump there.<BR>
       If it doesn't then please click <A HREF="http://www.xyz.com">here</A> to go there.
       </BODY>
       </HTML>
    

    【讨论】:

    • 这两种方法我之前都测试过,用这两种方法都拿不到referrer
    • 我已经在 firefox、crome 和 ie8 中测试过第二个,它运行良好。
    • 我又测试过了,应该是https的问题导致我的页面不能通过refferer,有没有把https页面中的referer传给http页面的想法?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-11-02
    • 1970-01-01
    • 2016-04-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多