【发布时间】:2011-12-07 08:20:04
【问题描述】:
如何自动点击带有referrer的链接或自动重定向带有referrer的链接? 正如我所测试的,使用 location.href 和 location.replace 不会将引用者传递到下一页。有什么方法吗?
【问题讨论】:
标签: javascript html redirect referrer
如何自动点击带有referrer的链接或自动重定向带有referrer的链接? 正如我所测试的,使用 location.href 和 location.replace 不会将引用者传递到下一页。有什么方法吗?
【问题讨论】:
标签: javascript html redirect referrer
你可以通过这个
<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>
【讨论】: